B
    ÔùÓ`Ó  ã               @   s   d Z ddlZG dd„ dƒZdS )zpSingleton class

.. versionadded:: 0.9.8

   - Add to make a kind of manager instancne later to manage plugins.
é    Nc               @   s$   e Zd ZdZdZe ¡ Zdd„ ZdS )Ú	SingletonzzSingleton utilizes __new__ special method.

    .. note:: Inherited classes are equated with base class inherit this.
    Nc          	   C   s8   | j d kr2| j� | j d kr(t | ¡| _ W d Q R X | j S )N)Ú_Singleton__instanceÚ_Singleton__lockÚobjectÚ__new__)Úcls© r   ú7/tmp/pip-unpacked-wheel-bpftjxoo/anyconfig/singleton.pyr      s
    

zSingleton.__new__)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú	threadingÚRLockr   r   r   r   r   r	   r      s   r   )r   r   r   r   r   r   r	   Ú<module>   s   