pattern.py
This module provides some common used patterns.
__all__ = ['Singleton']
module-attribute
¶
Singleton
¶
Bases: type
Singleton meta class.
Examples:
>>> class Test(object):
>>> __metaclass__ = Singleton
>>>
>>> def __init__(self):
>>> pass
Source code in solnlib/pattern.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
__call__(*args, **kwargs)
¶
Source code in solnlib/pattern.py
37 38 39 40 |
|
__init__(name, bases, attrs)
¶
Source code in solnlib/pattern.py
33 34 35 |
|