Package rubacon :: Package utility :: Module Singleton
[hide private]
[frames] | no frames]

Source Code for Module rubacon.utility.Singleton

1 -class Singleton(object):
2 """ The implementation of a singleton"""
3 - def __new__(cls, *args, **kwargs):
4 """make it a singleton""" 5 if '__inst' not in vars(cls): 6 cls.__inst = super(Singleton, cls).__new__(cls, *args, **kwargs) 7 return cls.__inst
8