MINI MINI MANI MO

Path : /usr/lib64/python3.6/__pycache__/
File Upload :
Current File : //usr/lib64/python3.6/__pycache__/copyreg.cpython-36.opt-1.pyc

3


 \_ã@s®dZdddddgZiZddd„Zdd„ZyeWnek
rDYnXd	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_cacheNcCs,t|ƒstdƒ‚|t|<|dk	r(t|ƒdS)Nz$reduction functions must be callable)ÚcallableÚ	TypeErrorÚdispatch_tabler)Úob_typeÚpickle_functionÚconstructor_ob©rú/usr/lib64/python3.6/copyreg.pyrs
cCst|ƒstdƒ‚dS)Nzconstructors must be callable)rr)Úobjectrrr
rscCst|j|jffS)N)ÚcomplexÚrealÚimag)Úcrrr
Úpickle_complex"srcCs<|tkrtj|ƒ}n$|j||ƒ}|jtjkr8|j||ƒ|S)N)rÚ__new__Ú__init__)ÚclsÚbaseÚstateÚobjrrr
Ú_reconstructor)sréé	cCsàx,|jjD]}t|dƒr
|jt@r
Pq
Wt}|tkr<d}n ||jkrTtd|jƒ‚||ƒ}|j||f}y
|j}WnLt	k
r¾t
|ddƒr–tdƒ‚y
|j}Wnt	k
r¸d}YnXYnX|ƒ}|rÔt||fSt|fSdS)NÚ	__flags__zcan't pickle %s objectsÚ	__slots__zNa class that defines __slots__ without defining __getstate__ cannot be pickled)
Ú	__class__Ú__mro__ÚhasattrrÚ	_HEAPTYPErrÚ__name__Ú__getstate__ÚAttributeErrorÚgetattrÚ__dict__r)ÚselfÚprotorrÚargsÚgetstateÚdictrrr
Ú
_reduce_ex6s.



r-cGs|j|f|žŽS)N)r)rr*rrr
Ú
__newobj__Wsr.cCs|j|f|ž|Ž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__Zsr0c	Csâ|jjdƒ}|dk	r|Sg}t|dƒs(nžxœ|jD]’}d|jkr0|jd}t|tƒrX|f}xh|D]`}|d	krnq^q^|jdƒr´|jdƒr´|jj	dƒ}|r¨|j
d||fƒq¾|j
|ƒq^|j
|ƒq^Wq0Wy
||_WnYnX|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)r'r2)r'Úgetr!r Ú
isinstanceÚstrÚ
startswithÚendswithr#ÚlstripÚappendr1)rÚnamesrÚslotsÚnameÚstrippedrrr
Ú
_slotnames`s2





r@cCsœt|ƒ}d|kodkns(tdƒ‚||f}tj|ƒ|krPtj|ƒ|krPdS|tkrltd|t|fƒ‚|tkrˆtd|t|fƒ‚|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_registryr5Ú_inverted_registry)Úmoduler>ÚcodeÚkeyrrr
r¢scCsR||f}tj|ƒ|ks$tj|ƒ|kr4td||fƒ‚t|=t|=|tkrNt|=dS)z0Unregister an extension code.  For testing only.z%key %s is not registered with code %sN)rCr5rDrBÚ_extension_cache)rEr>rFrGrrr
r´scCstjƒdS)N)rHÚclearrrrr
rÀs)Ni)Ú__doc__Ú__all__rrrrÚ	NameErrorrrr"r-r.r0r@rCrDrHrrrrrrr
Ú<module>s.


	!<

OHA YOOOO