Return to Snippet

Revision: 24343
at February 26, 2010 16:41 by sukantahazra


Initial Code
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

Initial URL

                                

Initial Description

                                

Initial Title
python Singleton

Initial Tags
python

Initial Language
Python