AlkantarClanX12

Your IP : 18.118.30.137


Current Path : /opt/alt/python34/lib64/python3.4/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/__pycache__/copyreg.cpython-34.pyc

�
i f��@s�dZdddddgZiZddd�Zdd�ZyeWnek
rXYnXd	d
�Zeeee�dd�ZdZ	dd�Z
dd�Zdd�Zdd�Z
iZiZiZdd�Zdd�Zdd�ZdS)z�Helper to provide extensibility for pickle.

This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
�pickle�constructor�
add_extension�remove_extension�clear_extension_cacheNcCsBt|�std��n|t|<|dk	r>t|�ndS)Nz$reduction functions must be callable)�callable�	TypeError�dispatch_tabler)�ob_type�pickle_function�constructor_ob�r�,/opt/alt/python34/lib64/python3.4/copyreg.pyrs

cCst|�std��ndS)Nzconstructors must be callable)rr)�objectrrr
rscCst|j|jffS)N)�complex�real�imag)�crrr
�pickle_complex"srcCsY|tkrtj|�}n7|j||�}|jtjkrU|j||�n|S)N)r�__new__�__init__)�cls�base�state�objrrr
�_reconstructor)sr��	cCs=|dkst�x;|jjD]'}t|d�r|jt@rPqqWt}|tkred}n1||jkr�td|j��n||�}|j||f}y
|j	}Wn[t
k
rt|dd�r�td��ny
|j}Wnt
k
r
d}YnXYn
X|�}|r/t
||fSt
|fSdS)N��	__flags__zcan't pickle %s objects�	__slots__zNa class that defines __slots__ without defining __getstate__ cannot be pickled)�AssertionError�	__class__�__mro__�hasattrr�	_HEAPTYPErr�__name__�__getstate__�AttributeError�getattr�__dict__r)�self�protorr�args�getstate�dictrrr
�
_reduce_ex6s0	



	
r/cGs|j||�S)N)r)rr,rrr
�
__newobj__Wsr0cCs|j|||�S)zUsed by pickle protocol 4, instead of __newobj__ to allow classes with
    keyword-only arguments to be pickled correctly.
    )r)rr,�kwargsrrr
�
__newobj_ex__Zsr2c	Cs|jjd�}|dk	r"|Sg}t|d�s:n�x�|jD]�}d|jkrD|jd}t|t�r�|f}nxl|D]a}|dkr�q�q�|jd�r�|jd�r�|jd|j	|f�q�|j|�q�WqDqDWy
||_
WnYnX|S)	a�Return a list of slot names for a given class.

    This needs to find slots defined by the class and its bases, so we
    can't simply return the __slots__ attribute.  We must walk down
    the Method Resolution Order and concatenate the __slots__ of each
    class found there.  (This assumes classes don't modify their
    __slots__ attribute to misrepresent their slots after the class is
    defined.)
    �
__slotnames__Nrr)�__weakref__�__z_%s%s)z__dict__z__weakref__)r)�getr#r"�
isinstance�str�
startswith�endswith�appendr%r3)r�namesr�slots�namerrr
�
_slotnames`s,


r?cCs�t|�}d|ko#dkns7td��n||f}tj|�|krqtj|�|krqdS|tkr�td|t|f��n|tkr�td|t|f��n|t|<|t|<dS)zRegister an extension code.ri���zcode out of rangeNz)key %s is already registered with code %sz$code %s is already in use for key %s)�int�
ValueError�_extension_registryr6�_inverted_registry)�moduler>�code�keyrrr
r�s
cCsw||f}tj|�|ks6tj|�|krOtd||f��nt|=t|=|tkrst|=ndS)z0Unregister an extension code.  For testing only.z%key %s is not registered with code %sN)rBr6rCrA�_extension_cache)rDr>rErFrrr
r�scCstj�dS)N)rG�clearrrrr
r�si)�__doc__�__all__rrrr�	NameErrorrrr$r/r0r2r?rBrCrGrrrrrrr
�<module>s.

	!8