Files
PowerToys/PythonEnv/2.7/Lib/copy_reg.pyc

35 lines
5.4 KiB
Plaintext
Raw Normal View History

2013-12-21 01:22:42 +08:00
<03>
<EFBFBD><EFBFBD>uMc@s<>dZddlmZdddddgZiZdd<00>Zd <00>Zye Wne
k
ranXd
<00>Z ee e e <00>d <00>Z dZ d<00>Zd<00>Zd<00>ZiZiZiZd<00>Zd<00>Zd<00>ZdS(s<>Helper to provide extensibility for pickle/cPickle.
This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
i<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(t ClassTypetpicklet constructort add_extensiontremove_extensiontclear_extension_cachecCsft|<00>tkr!td<00><00>nt|d<00>s?td<00><00>n|t|<|dk rbt|<00>ndS(Ns-copy_reg is not intended for use with classest__call__s$reduction functions must be callable(ttypet
_ClassTypet TypeErrorthasattrtdispatch_tabletNoneR(tob_typetpickle_functiontconstructor_ob((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyRs
 cCs"t|d<00>std<00><00>ndS(NRsconstructors must be callable(R
R (tobject((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyRscCst|j|jffS(N(tcomplextrealtimag(tc((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pytpickle_complex'scCsY|tkrtj|<00>}n7|j||<00>}|jtjkrU|j||<00>n|S(N(Rt__new__t__init__(tclstbasetstatetobj((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyt_reconstructor.s  ii cCs8|dkst<00>x;|jjD]'}t|d<00>r|jt@ rPqqWt}|tkred}n.||jkr<>td|j <16>n||<00>}|j||f}y |j
}WnYt k
r t |dd<00>r<>td<00><00>ny |j }Wqt k
r d}qXn
X|<00>}|r*t||fSt|fSdS(Nit __flags__scan't pickle %s objectst __slots__sNa class that defines __slots__ without defining __getstate__ cannot be pickled(tAssertionErrort __class__t__mro__R
Rt _HEAPTYPERR R t__name__t __getstate__tAttributeErrortgetattrt__dict__R(tselftprotoRRtargstgetstatetdict((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyt
_reduce_ex;s0         cGs|j||<00>S(N(R(RR*((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyt
__newobj__\scCs|jjd<00>}|dk r"|Sg}t|d<00>s:n<>x<>|jD]<5D>}d|jkrD|jd}t|t<00>r<>|f}nxl|D]a}|dkr<>q<>q<>|jd<00>r<>|jd<00> r<>|j d|j
|f<16>q<>|j |<00>q<>WqDqDWy ||_ WnnX|S( s<>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.)
t __slotnames__RR't __weakref__t__s_%s%sN(s__dict__s __weakref__( R'tgetR R
R!t
isinstancet
basestringt
startswithtendswithtappendR#R/(RtnamesRtslotstname((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyt
_slotnames_s,       cCs<>t|<00>}d|ko#dkns4td<00>n||f}tj|<00>|krntj|<00>|krndS|tkr<>td|t|f<16><00>n|tkr<>td|t|f<16><00>n|t|<|t|<dS(sRegister an extension code.ii<><69><EFBFBD>scode out of rangeNs)key %s is already registered with code %ss$code %s is already in use for key %s(tintt
ValueErrort_extension_registryR2t_inverted_registry(tmoduleR:tcodetkey((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyR<00>s     
cCsw||f}tj|<00>|ks6tj|<00>|krOtd||f<16><00>nt|=t|=|tkrst|=ndS(s0Unregister an extension code. For testing only.s%key %s is not registered with code %sN(R>R2R?R=t_extension_cache(R@R:RARB((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyR<00>s  cCstj<00>dS(N(RCtclear(((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyR<00>sNi(t__doc__ttypesRRt__all__R R RRRt NameErrorRRR"R-R.R;R>R?RCRRR(((sEd:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\copy_reg.pyt<module>s.     !  8