;
Éâ"Ic            
   @   sÉ   d  Z  d d d d d g Z i  Z d d „ Z d „  Z y e Wn e k
 o Yn 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(   u¤   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.
u   pickleu   constructoru   add_extensionu   remove_extensionu   clear_extension_cachec             C   sI   t  | d ƒ p t d ƒ ‚ n | t |  <| d  k	 o t | ƒ n d  S(   Nu   __call__u$   reduction functions must be callable(   u   hasattru	   TypeErroru   dispatch_tableu   Noneu   constructor(   u   ob_typeu   pickle_functionu   constructor_ob(    (    u$   /mit/python/lib/python3.0/copyreg.pyu   pickle   s
    
c             C   s$   t  |  d ƒ p t d ƒ ‚ n d  S(   Nu   __call__u   constructors must be callable(   u   hasattru	   TypeError(   u   object(    (    u$   /mit/python/lib/python3.0/copyreg.pyu   constructor   s    c             C   s   t  |  j |  j f f S(   N(   u   complexu   realu   imag(   u   c(    (    u$   /mit/python/lib/python3.0/copyreg.pyu   pickle_complex"   s    c             C   s]   | t  k o t  j |  ƒ } n: | j |  | ƒ } | j t  j k o | j | | ƒ n | S(   N(   u   objectu   __new__u   __init__(   u   clsu   baseu   stateu   obj(    (    u$   /mit/python/lib/python3.0/copyreg.pyu   _reconstructor)   s    i   i	   c             C   sN  | d k  p t  ‚ x> |  j j D]* } t | d ƒ o | j t @o Pq! q! Wt } | t k o
 d  } n4 | |  j k o t d | j	 ƒ ‚ n | |  ƒ } |  j | | f } y |  j
 } Wna t k
 oU t |  d d  ƒ o t d ƒ ‚ n y |  j } Wn t k
 o d  } Yn XYn X| ƒ  } | o t | | f St | f Sd  S(   Ni   u	   __flags__u   can't pickle %s objectsu	   __slots__uN   a class that defines __slots__ without defining __getstate__ cannot be pickled(   u   AssertionErroru	   __class__u   __mro__u   hasattru	   __flags__u	   _HEAPTYPEu   objectu   Noneu	   TypeErroru   __name__u   __getstate__u   AttributeErroru   getattru   __dict__u   _reconstructor(   u   selfu   protou   baseu   stateu   argsu   getstateu   dict(    (    u$   /mit/python/lib/python3.0/copyreg.pyu
   _reduce_ex6   s2     	
	c             G   s   |  j  |  | Œ S(   N(   u   __new__(   u   clsu   args(    (    u$   /mit/python/lib/python3.0/copyreg.pyu
   __newobj__W   s    c          
   C   s  |  j  j d ƒ } | d k	 o | Sg  } t |  d ƒ p nÄ xÀ |  j D]µ } d | j  k oŸ | j  d } t | t ƒ o | f } n xr | D]f } | d k o q q | j d ƒ o/ | j d ƒ o | j	 d | j
 | f ƒ q | j	 | ƒ q WqH qH Wy | |  _ Wn Yn X| S(	   u›  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.)
    u   __slotnames__u	   __slots__u   __dict__u   __weakref__u   __u   _%s%sN(   u   __dict__u   __weakref__(   u   __dict__u   getu   Noneu   hasattru   __mro__u
   isinstanceu   stru
   startswithu   endswithu   appendu   __name__u   __slotnames__(   u   clsu   namesu   cu   slotsu   name(    (    u$   /mit/python/lib/python3.0/copyreg.pyu
   _slotnamesZ   s0    
  !c             C   så   t  | ƒ } d | k o
 d k n p t d ƒ ‚ n |  | f } t j | ƒ | k o t j | ƒ | k o d S| t k o t d | t | f ƒ ‚ n | t k o t d | t | f ƒ ‚ n | t | <| t | <d S(   u   Register an extension code.i   iÿÿÿu   code out of rangeNu)   key %s is already registered with code %su$   code %s is already in use for key %s(   u   intu
   ValueErroru   _extension_registryu   getu   _inverted_registry(   u   moduleu   nameu   codeu   key(    (    u$   /mit/python/lib/python3.0/copyreg.pyu   add_extension˜   s    
c             C   s|   |  | f } t  j | ƒ | k p t j | ƒ | k o t d | | f ƒ ‚ n t  | =t | =| t k o t | =n d S(   u0   Unregister an extension code.  For testing only.u%   key %s is not registered with code %sN(   u   _extension_registryu   getu   _inverted_registryu
   ValueErroru   _extension_cache(   u   moduleu   nameu   codeu   key(    (    u$   /mit/python/lib/python3.0/copyreg.pyu   remove_extensionª   s    c               C   s   t  j ƒ  d  S(   N(   u   _extension_cacheu   clear(    (    (    u$   /mit/python/lib/python3.0/copyreg.pyu   clear_extension_cache¶   s    Ni   (   u   __doc__u   __all__u   dispatch_tableu   Noneu   pickleu   constructoru   complexu	   NameErroru   pickle_complexu   _reconstructoru	   _HEAPTYPEu
   _reduce_exu
   __newobj__u
   _slotnamesu   _extension_registryu   _inverted_registryu   _extension_cacheu   add_extensionu   remove_extensionu   clear_extension_cache(    (    (    u$   /mit/python/lib/python3.0/copyreg.pyu   <module>   s,   
					!		8		