3 �<�eO � @ s G d d� de �ZdS )c @ s( e Zd ZdZdZdd� Zedd� �ZdS )� Singletonz Singleton design pattern. Nc C s | j tkrtd��d S )NzCannot instantiate directly.)� __class__r � TypeError)�self� r �/usr/lib/python3.6/patterns.py�__init__ s zSingleton.__init__c C s | j dkr| � | _ | j S )zGet the class instance.N)� _instance)�clsr r r �get_instance s zSingleton.get_instance)�__name__� __module__�__qualname__�__doc__r r �classmethodr r r r r r s r N)�objectr r r r r �<module> s
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__init__.cpython-36.opt-1.pyc | File | 250 B | 0644 |
|
__init__.cpython-36.pyc | File | 250 B | 0644 |
|
consts.cpython-36.opt-1.pyc | File | 6.46 KB | 0644 |
|
consts.cpython-36.pyc | File | 6.46 KB | 0644 |
|
exceptions.cpython-36.opt-1.pyc | File | 946 B | 0644 |
|
exceptions.cpython-36.pyc | File | 946 B | 0644 |
|
logs.cpython-36.opt-1.pyc | File | 4.4 KB | 0644 |
|
logs.cpython-36.pyc | File | 4.42 KB | 0644 |
|
patterns.cpython-36.opt-1.pyc | File | 714 B | 0644 |
|
patterns.cpython-36.pyc | File | 714 B | 0644 |
|
version.cpython-36.opt-1.pyc | File | 248 B | 0644 |
|
version.cpython-36.pyc | File | 248 B | 0644 |
|