HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
Singelon.py
Go to the documentation of this file.
1 '''
2 Created on Mar 18, 2014
3 
4 @author: igor
5 '''
6 
7 
9 class Singleton(type):
10 
11  _instances = {}
12 
13  def __call__(cls, *args, **kwargs):
14  if cls not in cls._instances:
15  cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
16  return cls._instances[cls]
17 
The class allow to have only one instance of a object.
Definition: Singelon.py:9
def __call__(cls, args, kwargs)
Definition: Singelon.py:13