;ò
ÎÑAHc           @   s>   d  g Z  d k l Z l Z e e f Z d „  Z d „  Z d S(   s   generic(   s	   ClassTypes   InstanceTypec   
         s  t  ƒ  ‰ ‡ ‡  ‡ d †  } h  t  ˆ  <t | <‰ ˆ i ‰ ‡ ‡  d †  } h  ‰ ˆ i ‰ ‡ ‡  d †  }	 ‡ ‡ ‡  ‡ d †  } y ˆ  i | _ Wn t j
 o n Xˆ  i i ƒ  | _ ˆ  i | _ ˆ  i | _ | | _ |	 | _ ˆ  | _ ‡ d †  | _ ‡ d †  | _ | Sd S(   s    Create a simple generic functionc             st   |  d i } x` t | i | t f h  ƒ i D]3 } ˆ | ˆ  ƒ } | ˆ  j	 o | |  | Ž  Sq, q, Wˆ |  | Ž  Sd  S(   Ni    (   s   argss	   __class__s   clss   types   __name__s   objects   __mro__s   ts   _gbts	   _sentinels   fs   kws   func(   s   argss   kws   fs   ts   cls(   s	   _sentinels   funcs   _gbt(    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys	   _by_class   s     c            sB   t  ˆ  t ƒ o t d ˆ  f ƒ ‚ n ‡ ‡  ‡ d †  } | Sd S(   s:   Decorator to add a method that will be called for type `t`s   %r is not a type or classc            s;   ˆ  i ˆ |  ƒ |  j	 o t d ˆ ˆ f ƒ ‚ n |  Sd  S(   Ns!   %r already has method for type %r(   s   _by_types
   setdefaults   ts   fs	   TypeErrors   func(   s   f(   s   _by_types   ts   func(    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   decorate*   s    N(   s
   isinstances   ts
   classtypess	   TypeErrors   decorate(   s   ts   decorate(   s   _by_types   func(   s   tsN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys	   when_type$   s
     c            s   ‡ ‡  ‡ d †  } | Sd S(   s<   Decorator to add a method that will be called for object `o`c            sK   ˆ  i t ˆ ƒ ˆ |  f ƒ d |  j	 o t d ˆ ˆ f ƒ ‚ n |  Sd  S(   Ni   s#   %r already has method for object %r(   s
   _by_objects
   setdefaults   ids   os   fs	   TypeErrors   func(   s   f(   s
   _by_objects   os   func(    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   decorate<   s    )N(   s   decorate(   s   os   decorate(   s
   _by_objects   func(   s   osN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   when_object:   s     c             s—   ˆ t |  d ƒ ˆ  ƒ } | ˆ  j o\ xj t |  d ƒ i D]3 } ˆ | ˆ  ƒ } | ˆ  j	 o | |  | Ž  Sq: q: Wˆ |  | Ž  Sn | d |  | Ž  Sd  S(   Ni    i   (   s   _gbos   ids   argss	   _sentinels   fs   types   __mro__s   ts   _gbts   kws   func(   s   argss   kws   fs   t(   s	   _sentinels   _gbos   funcs   _gbt(    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   dispatchE   s     c            s   t  |  ƒ ˆ  j S(   N(   s   ids   os
   _by_object(   s   o(   s
   _by_object(    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   <lambda>\   s    c            s
   |  ˆ  j S(   N(   s   ts   _by_type(   s   t(   s   _by_type(    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   <lambda>]   s    N(   s   objects	   _sentinels	   _by_classs   funcs   InstanceTypes   _by_types   gets   _gbts	   when_types
   _by_objects   _gbos   when_objects   dispatchs   __name__s	   TypeErrors   __dict__s   copys   __doc__s
   __module__s   defaults
   has_objects   has_type(
   s   funcs	   when_types	   _by_classs	   _sentinels   _gbos
   _by_objects   dispatchs   _by_types   _gbts   when_object(    (   s   funcs
   _by_objects	   _sentinels   _gbos   _by_types   _gbtsN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   generic   s.     							c          C   s*   d  k  }  |  i d d |  i |  i BƒSd  S(   Ns
   README.txts   optionflags(   s   doctests   DocFileSuites   ELLIPSISs   REPORT_ONLY_FIRST_FAILURE(   s   doctest(    (    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys
   test_suitec   s    		N(   s   __all__s   typess	   ClassTypes   InstanceTypes   types
   classtypess   generics
   test_suite(   s   __all__s   generics	   ClassTypes
   test_suites
   classtypess   InstanceType(    (    sN   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/external/simplegeneric.pys   ?   s   		P