/ Published in: Python
Expand |
Embed | Plain Text
class Singleton(object): def __new__(cls, *p, **k): if not '_the_instance' in cls.__dict__: cls._the_instance = object.__new__(cls) return cls._the_instance
You need to login to post a comment.
