Package elisa :: Package core :: Package utils :: Module singleton :: Class Singleton

Class Singleton

source code


Implements the Singleton pattern.

Every class inheriting from Singleton will have one and only one instance of its kind at any time.

NOTE: uses __new__ which has been introduced in Python 2.2

Instance Methods
a new object with type S, a subtype of T
__new__(cls, *args, **kwargs) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__new__(cls, *args, **kwargs)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)