
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
\¼meþ  ã               @   s   d dl Z G dd„ dƒZdS )é    Nc               @   s>   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	d
„Zedd„ ƒZ	dS )ÚDictRegistryz+A simple registry for a mapping of objects.c             C   s   | j ƒ  d S )N)Úreset)Úself© r   ú/usr/lib/python3.6/registry.pyÚ__init__   s    zDictRegistry.__init__c             C   s
   i | _ d S )N)Ú_items)r   r   r   r   r      s    zDictRegistry.resetc             C   s&   || j krtdj|ƒƒ‚|| j |< dS )zAdd item to the registry.z$Item already registered with key {0}N)r   Ú
ValueErrorÚformat)r   ÚkeyÚitemr   r   r   Úregister_item   s    
zDictRegistry.register_itemTc             C   s(   || j kr| j |= n|s$td| ƒ‚dS )zRemove item from the registry.z!%s: key not present to unregisterN)r   ÚKeyError)r   r   Úforcer   r   r   Úunregister_item   s    

zDictRegistry.unregister_itemc             C   s   t j | jƒS )zvAll the items that have been registered.

        This cannot be used to modify the contents of the registry.
        )Úcopyr   )r   r   r   r   Úregistered_items    s    zDictRegistry.registered_itemsN)T)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úpropertyr   r   r   r   r   r      s   
r   )r   r   r   r   r   r   Ú<module>   s   