//usr/lib64/lib64//lib64/lib64/python2.7/ó
ÙœSec @ sÖ d Z d d l m Z d d d d d g Z i Z d d „ Z d „ Z y e Wn e
k
ra n Xd
„ Z e e e e ƒ d „ Z d Z
d „ Z d „ Z d „ Z i Z i Z i Z d „ Z d „ Z d „ Z d S( 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ÿÿÿÿ( t ClassTypet picklet constructort
add_extensiont remove_extensiont clear_extension_cachec C sf t | ƒ t k r! t d ƒ ‚ n t | d ƒ s? t d ƒ ‚ n | t | <| d k rb t | ƒ n d S( Ns- copy_reg is not intended for use with classest __call__s$ reduction functions must be callable( t typet
_ClassTypet TypeErrort hasattrt dispatch_tablet NoneR ( t ob_typet pickle_functiont constructor_ob( ( s /usr/lib64/python2.7/copy_reg.pyR s
c C s" t | d ƒ s t d ƒ ‚ n d S( NR s constructors must be callable( R
R ( t object( ( s /usr/lib64/python2.7/copy_reg.pyR s c C s t | j | j f f S( N( t complext realt imag( t c( ( s /usr/lib64/python2.7/copy_reg.pyt pickle_complex' s c C sY | t k r t j | ƒ } n7 | j | | ƒ } | j t j k rU | j | | ƒ n | S( N( R t __new__t __init__( t clst baset statet obj( ( s /usr/lib64/python2.7/copy_reg.pyt _reconstructor. s i i c C s& x; | j j D]' } t | d ƒ r
| j t @r
Pq
q
Wt } | t k rS d } n. | | j k ru t d | j ‚ n | | ƒ } | j | | f } y
| j } WnY t
k
rû t | d d ƒ rÑ t d ƒ ‚ n y
| j } Wqt
k
r÷ d } qXn
X| ƒ } | rt
| | f St
| f Sd S( Nt __flags__s can't pickle %s objectst __slots__sN a class that defines __slots__ without defining __getstate__ cannot be pickled( t __class__t __mro__R
R t _HEAPTYPER R R t __name__t __getstate__t AttributeErrort getattrt __dict__R ( t selft protoR R t argst getstatet dict( ( s /usr/lib64/python2.7/copy_reg.pyt
_reduce_ex; s.
c G s | j | | Œ S( N( R ( R R) ( ( s /usr/lib64/python2.7/copy_reg.pyt
__newobj__\ s c C s | j j d ƒ } | d k r" | Sg } t | d ƒ s: nº x· | j D]¬ } d | j k rD | j d } t | t ƒ r | f } n xl | D]a } | d k r qˆ qˆ | j d ƒ rÜ | j d ƒ rÜ | j d | j
| f ƒ qˆ | j | ƒ qˆ WqD qD Wy
| | _ Wn n X| 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__R R&