+
    VBiz                     z   ^ RI t ^ RIt^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIH	t	 ^ RI
t
]
P                  ! ]]]]]]34      t ! R	 R
4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R4      t/ RRbRRbRRbRRbRRbRR bR!R"bR#R$bR%R&bR'R(bR)R*bR+R,bR-R.bR/R0bR1R2bR3R4bR5R6bR7R8R9R:/CP2                  tR;R<R=R>R5R?R!R@/P2                  t ! RA RB]4      t ! RC RD]4      tRE t ! RF RG]4      tRH t RI t! ! RJ RK]4      t"]#RL8X  d   ^ RI$t$]$PJ                  ! 4        R# R# )M    N)	TypeSlots)Builtin)Nodes)	ExprNodes)Errors)
DebugFlags)Futurec                      a a ] tR t^t oRtV 3R ltR tR tR t]	P                  R 4       tR t]	P                  R 4       t]	P                  R	 4       tRR
 lt]	P                  R 4       tRtVtV ;t# )TreeVisitora  
Base class for writing visitors for a Cython tree, contains utilities for
recursing such trees using visitors. Each node is
expected to have a child_attrs iterable containing the names of attributes
containing child nodes or lists of child nodes. Lists are not considered
part of the tree structure (i.e. contained nodes are considered direct
children of the parent node).

visit_children visits each of the children of a given node (see the visit_children
documentation). When recursing the tree using visit_children, an attribute
access_path is maintained which gives information about the current location
in the tree as a stack of tuples: (parent_node, attrname, index), representing
the node, attribute and optional list index that was taken in each step in the path to
the current node.

Example:

>>> class SampleNode(object):
...     child_attrs = ["head", "body"]
...     def __init__(self, value, head=None, body=None):
...         self.value = value
...         self.head = head
...         self.body = body
...     def __repr__(self): return "SampleNode(%s)" % self.value
...
>>> tree = SampleNode(0, SampleNode(1), [SampleNode(2), SampleNode(3)])
>>> class MyVisitor(TreeVisitor):
...     def visit_SampleNode(self, node):
...         print("in %s %s" % (node.value, self.access_path))
...         self.visitchildren(node)
...         print("out %s" % node.value)
...
>>> MyVisitor().visit(tree)
in 0 []
in 1 [(SampleNode(0), 'head', None)]
out 1
in 2 [(SampleNode(0), 'body', 0)]
out 2
in 3 [(SampleNode(0), 'body', 1)]
out 3
out 0
c                @   < \         SV `  4        / V n        . V n        R # N)super__init__dispatch_tableaccess_path)self	__class__s   &</usr/lib/python3.14/site-packages/Cython/Compiler/Visitor.pyr   TreeVisitor.__init__D   s         c                `   \        VP                  ;'       g    . 4      . R
O,           p. p\        VRR4      pV'       di   V^ ,          pV'       d.   ^ RIpVP                  P                  VP                  4       4      pVP                  V: RV^,          : RV^,          : 24       \        V4      pV F  pW9   d   K  VP                  R4      '       g   VP                  R4      '       d   K;   \        W4      p	T	e   T	^ 8X  d   KT  \        T	\         4      '       d   R\        T	4      ,          p	M#\        T	\        4      '       g   K  \        T	4      p	TP                  T: RT	: 24       K  	  VP                   P"                  : RRP%                  V4      : R	2#   \         d     K  i ; i)child_attrsposN:_z[...]/%d = (z,
    ))r   r   gil_messagecpp_messagesubexprs)listr   getattros.pathpathbasenameget_descriptionappenddir
startswithendswithAttributeError
isinstancelen
_PRINTABLEreprr   __name__join)
r   nodeignoredvaluesr   sourceosattribute_namesattrvalues
   &&        r   	dump_nodeTreeVisitor.dump_nodeI   sX   t''--2. 2L LdE4(VF))&*@*@*BCMMAA?@d)#Ds##t}}S'9'9+ }
E4(("SZ/z22UMMtU34# $$  >>22INN64JKK " s   1FF-,F-c                   ^ RI pTp. p\        VR4      '       d   VP                  pVP                  P	                  R4      p\        V\        P                  4      '       d_   VP                  pVP                  pVP                  P                  VP                  4      VP                  3p	VP                  WhV	34       TpVP                  pK  W43# )r   Ntb_framer   )r$   hasattrr>   f_localsgetr-   r   Nodef_codeco_namer%   r&   co_filenamef_linenor(   tb_next)
r   
stacktracer7   last_tracebacknodesframer3   codemethod_namer   s
   &&        r   _find_node_pathTreeVisitor._find_node_pathi   s    #j*--''E>>%%f-D$

++||"llww''(8(89~~'d56!+#++J&&r   c                v   R .pV P                    Fk  w  rEp\        WE4      pVf   R pMWv,          pRV,          pVP                  VP                  P                  : RV: V: RV P                  V4      : 24       Km  	  V P                  \        P                  ! 4       ^,          4      w  rTp
V	 F@  w  r{pTp
VP                  RV^ ,          V^,          WP                  V4      3,          4       KB  	  \        P                  ! \        V
RR4      V P                  P                  RP                  V4      W(4      h) Nz[%d].r   zFile '%s', line %d, in %s: %sr   
)r   r#   r(   r   r1   r;   rN   sysexc_infor   CompilerCrashr2   )r   childetraceparent	attributeindexr3   rH   called_nodes	last_noderM   r   s   &&&          r   _raise_compiler_error!TreeVisitor._raise_compiler_errorz   s   (,(8(8$Fu6-D}{LL  ))9et$& ' )9 $(#7#7q8I#J 
	&2"DsILL8AA^^D-A<C C D '3 ""Iud+T^^-D-DIIea- 	-r   c                   \        V4      p\        P                  ! V4      pV F)  p\        V R VP                  ,           R4      pVf   K'  Vu # 	  \        \        V 4      V4       V P                  '       dp   \        V P                  4       \        V P                  R,          ^ ,          P                  4       \        V P                  R,          ^ ,          P                  4       \        RV : RV: 24      h)visit_NzVisitor z does not accept object: )
typeinspectgetmror#   r1   printr   r   __dict__RuntimeError)r   objclsmromro_clshandler_methods   &&    r   find_handlerTreeVisitor.find_handler   s     3innS!G$T8g6F6F+FMN)%% 
 	d4j#$""#$""2&q)--.$""2&q)223dCPQQr   c                $    V P                  V4      # r   _visit)r   rj   s   &&r   visitTreeVisitor.visit   s    {{3r   c                     V P                   \        V4      ,          pV! V4      #   \         d,    T P                  T4      pY P                   \        T4      &    L=i ; i  \        P
                   d    h \        P                   d    h \         d4   p\        P                  '       d   h T P                  Y4        R p?R # R p?ii ; ir   )r   rd   KeyErrorro   r   CompileError
AbortError	Exceptionr   debug_no_exception_interceptr_   )r   rj   rn   rX   s   &&  r   rs   TreeVisitor._visit   s    	/@!%!4!4T#Y!? "#&&  @!%!2!23!71?##DI.@ "" 	   	 	/666&&s..	/s>   ' A  3AA  AA   (C	
CC(CCc                    V P                   P                  W#V34       V P                  V4      pV P                   P                  4        V# r   )r   r(   rs   pop)r   rW   rZ   attrnameidxresults   &&&&& r   _visitchildTreeVisitor._visitchild   sB     	3 78U#r   c                &    V P                  WV4      # r   )_visitchildrenr   rZ   attrsexcludes   &&&&r   visitchildrenTreeVisitor.visitchildren   s    ""6'::r   c                   Vf   R# / pVP                    F  pVe	   WR9  d   K  Ve	   WS9   d   K  \        W4      pVf   K,  \        V4      \        J d0   \	        V4       UUu. uF  w  rxV P                  WWW4      NK  	  p	ppM8V P                  WaVR4      p	\        V	\        4      '       d   Q RV: RV: 24       hWV&   K  	  V# u uppi )a.  
Visits the children of the given parent. If parent is None, returns
immediately (returning None).

The return value is a dictionary giving the results for each
child (mapping the attribute name to either the return value
or a list of return values (in the case of multiple children
in an attribute)).
NzCannot insert list here: z in )r   r#   rd   r"   	enumerater   r-   )
r   rZ   r   r   r   r9   rW   r   xchildretvals
   &&&&      r   r   TreeVisitor._visitchildren   s     >$&&D T%6"tF)E ;$&XabgXh"iXhfc4#3#3At#IXhK"iK"&"2"25$"MK)+t<<reikq>rr<*t '  #js   "C)r   r   NN)r1   
__module____qualname____firstlineno____doc__r   r;   rN   r_   cythonfinalro   rt   rs   r   r   r   __static_attributes____classdictcell____classcell__r   __classdict__s   @@r   r   r      s     )T
L@'"-, \\R R   \\/ /$ \\ ; \\  r   r   c                      a  ] tR t^t o RtR
R lt]P                  R
R l4       t]P                  R 4       t	RR lt
R tR tR	tV tR# )VisitorTransforma  
A tree transform is a base class for visitors that wants to do stream
processing of the structure (rather than attributes etc.) of a tree.

It implements __call__ to simply visit the argument node.

It requires the visitor methods to return the nodes which should take
the place of the visited node in the result tree (which can be the same
or one or more replacement). Specifically, if the return value from
a visitor method is:

- [] or None; the visited node will be removed (set to None if an attribute and
removed if in a list)
- A single node; the visited node will be replaced by the returned node.
- A list of nodes; the visited nodes will be replaced by all the nodes in the
list. This will only work if the node was already a member of a list; if it
was not, an exception will be raised. (Typically you want to ensure that you
are within a StatListNode or similar before doing this.)
Nc                &    V P                  WV4      # r   _process_childrenr   s   &&&&r   r   VisitorTransform.visitchildren   s    %%fW==r   c                    V P                  WV4      pVP                  4        F5  w  rV\        V4      \        J d   V P	                  V4      p\        WV4       K7  	  V# r   )r   itemsrd   r"   _flatten_listsetattr)r   rZ   r   r   r   r9   newnodes   &&&&   r   r   "VisitorTransform._process_children   sU     $$VG<#\\^MDG}$,,W5F'* , r   c                    . pV F@  pVf   K	  \        V4      \        J d   VP                  V4       K/  VP                  V4       KB  	  V# r   )rd   r"   extendr(   )r   	orig_listnewlistr   s   &&  r   r   VisitorTransform._flatten_list  sB     A}7d?NN1%NN1%  r   c                n    \        W4      pVe&   V P                  WAW#4      pWTJd   \        WV4       TpV# r   )r#   r   r   )r   rZ   r9   r   rW   r3   s   &&&&  r   
visitchildVisitorTransform.visitchild  s>    %##E4=D d+Er   c                (    V P                  V4       V# r   r   r   r3   s   &&r   recurse_to_children$VisitorTransform.recurse_to_children      t$r   c                $    V P                  V4      # r   rr   )r   roots   &&r   __call__VisitorTransform.__call__  s    {{4  r    r   r   )r1   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r      sS     &> \\  \\	 	! !r   r   c                   N   a a ] tR tRt oRtV 3R ltV 3R ltR tR tRt	Vt
V ;t# )CythonTransformi"  z
Certain common conventions and utilities for Cython transforms.

 - Sets up the context of the pipeline in self.context
 - Tracks directives in effect in self.current_directives
c                0   < \         SV `  4        Wn        R # r   )r   r   context)r   r   r   s   &&r   r   CythonTransform.__init__)  s    r   c                r   < ^RI H p \        W4      '       d   VP                  V n        \        SV `  V4      # )   )
ModuleNode)r   r-   
directivescurrent_directivesr   r   )r   r3   r   r   s   && r   r   CythonTransform.__call__-  s-    *d''&*ooD#w%%r   c                n    V P                   pVP                  V n         V P                  V4       W n         V# r   )r   r   r   )r   r3   olds   && r   visit_CompilerDirectivesNode,CythonTransform.visit_CompilerDirectivesNode3  s2    %%"&//t$"%r   c                (    V P                  V4       V# r   r   r   s   &&r   
visit_NodeCythonTransform.visit_Node:  r   r   )r   r   )r1   r   r   r   r   r   r   r   r   r   r   r   r   s   @@r   r   r   "  s#     & r   r   c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
ScopeTrackingTransformi?  c                B    R V n         Wn        V P                  V4       V# )module
scope_type
scope_noder   r   s   &&r   visit_ModuleNode'ScopeTrackingTransform.visit_ModuleNodeD  s!    "t$r   c                    V P                   V P                  3pW n         Wn        V P                  V4       Vw  V n         V n        V# r   r   )r   r3   r   prevs   &&& r   visit_scope"ScopeTrackingTransform.visit_scopeJ  s?    /$t$+/(r   c                &    V P                  VR 4      # )cclassr   r   s   &&r   visit_CClassDefNode*ScopeTrackingTransform.visit_CClassDefNodeR      h//r   c                &    V P                  VR 4      # )pyclassr   r   s   &&r   visit_PyClassDefNode+ScopeTrackingTransform.visit_PyClassDefNodeU  s    i00r   c                &    V P                  VR 4      # )functionr   r   s   &&r   visit_FuncDefNode(ScopeTrackingTransform.visit_FuncDefNodeX  s    j11r   c                &    V P                  VR 4      # )structr   r   s   &&r   visit_CStructOrUnionDefNode2ScopeTrackingTransform.visit_CStructOrUnionDefNode[  r   r   )r   r   N)r1   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r   ?  s(     
0120 0r   r   c                   ~   a a ] tR tRt oRtV 3R ltR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tRtVtV ;t# )EnvTransformi_  z8
This transformation keeps a stack of the environments.
c                f   < . V n         V P                  WP                  4       \        SV `  V4      # r   )	env_stackenter_scopescoper   r   )r   r   r   s   &&r   r   EnvTransform.__call__c  s,    zz*w%%r   c                6    V P                   R,          ^,          # r   rc   r   r   s   &r   current_envEnvTransform.current_envh      ~~b!!$$r   c                6    V P                   R,          ^ ,          # r   r   r   s   &r   current_scope_nodeEnvTransform.current_scope_nodek  r   r   c                >    V P                  4       P                  4       # r   )r   global_scoper   s   &r   r   EnvTransform.global_scopen  s    !..00r   c                >    V P                   P                  W34       R # r   )r   r(   )r   r3   r   s   &&&r   r   EnvTransform.enter_scopeq  s    tm,r   c                :    V P                   P                  4        R # r   )r   r~   r   s   &r   
exit_scopeEnvTransform.exit_scopet  s    r   c                    V P                  V4       V P                  WP                  4       V P                  VR VP                  R7       V P                  4        V# )N)r   r   )visit_func_outer_attrsr   local_scoper   outer_attrsr  r   s   &&r   r   EnvTransform.visit_FuncDefNodew  sN    ##D)//04tT5E5EFr   c                >    V P                  WP                  R 7       R# ))r   N)r   r	  r   s   &&r   r  #EnvTransform.visit_func_outer_attrs~  s    4'7'78r   c                (    V P                  V4       V# r   r   r   s   &&r   visit_GeneratorBodyDefNode'EnvTransform.visit_GeneratorBodyDefNode  r   r   c                ~    V P                  WP                  4       V P                  V4       V P                  4        V# r   r   r   r   r  r   s   &&r   visit_ClassDefNodeEnvTransform.visit_ClassDefNode  1    zz*t$r   c                ~    V P                  WP                  4       V P                  V4       V P                  4        V# r   r  r   s   &&r   r   (EnvTransform.visit_CStructOrUnionDefNode  r  r   c                    VP                   '       d?   V P                  WP                   4       V P                  V4       V P                  4        V# V P                  V4       V# r   )
expr_scoper   r   r  r   s   &&r   visit_ScopedExprNode!EnvTransform.visit_ScopedExprNode  sQ    ???T??3""4(OO  ""4(r   c                X   VP                   '       d   VP                   Uu. uF  q"R 8w  g   K  VNK  	  ppV P                  W4       V P                  WP	                  4       P
                  4       V P                  VR4       V P                  4        V# V P                  V4       V# u upi )default)r  )r  r   r   r   r   outer_scoper   r  )r   r3   r9   r   s   &&  r   visit_CArgDeclNodeEnvTransform.visit_CArgDeclNode  s    <<<&*&6&6L&6d):KTT&6EL""4/T#3#3#5#A#ABt\2OO  ""4( Ms
   B'B'r   )r1   r   r   r   r   r   r   r   r   r   r  r   r  r  r  r   r  r  r   r   r   r   s   @@r   r   r   _  sP     &
%%1-9
 
r   r   c                   H   a a ] tR tRt oRtV 3R ltR tR tR tRt	Vt
V ;t# )NodeRefCleanupMixini  aW  
Clean up references to nodes that were replaced.

NOTE: this implementation assumes that the replacement is
done first, before hitting any further references during
normal tree traversal.  This needs to be arranged by calling
"self.visitchildren()" at a proper place in the transform
and by ordering the "child_attrs" of nodes appropriately.
c                2   < \         SV `  ! V!   / V n        R # r   )r   r   _replacements)r   argsr   s   &*r   r   NodeRefCleanupMixin.__init__  s    $r   c                    VP                   pW P                  9  d   V P                  V4       V P                  P                  W"4      Vn         V# r   )argr#  r   rA   )r   r3   r'  s   && r   visit_CloneNode#NodeRefCleanupMixin.visit_CloneNode  sB    hh(((s#%%))#3r   c                    VP                   pVe   W P                  9  d   V P                  V4       VP                   pVe!   V P                  P                  W"4      Vn         V# r   )
expressionr#  r   rA   )r   r3   exprs   && r   visit_ResultRefNode'NodeRefCleanupMixin.visit_ResultRefNode  sU    <4'9'99t$??D"0044T@DOr   c                "    W P                   V&   V# r   r#  )r   r3   replacements   &&&r   replaceNodeRefCleanupMixin.replace  s    #.4 r   r0  )r1   r   r   r   r   r   r(  r-  r2  r   r   r   r   s   @@r   r!  r!    s#       r   r!  <__lt__z<=__le__z==__eq__z!=__ne__z>=__ge__>__gt__+__add__&__and__/__div__z//__floordiv__z<<
__lshift__%__mod__*__mul__|__or__z**__pow__z>>
__rshift__-__sub__^__xor__in__contains__not__not__~__inv____neg____pos__c                   l   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tRtV tR# )MethodDispatcherTransformi  a  
Base class for transformations that want to intercept on specific
builtin functions or methods of builtin types, including special
methods triggered by Python operators.  Must run after declaration
analysis when entries were assigned.

Naming pattern for handler methods is as follows:

* builtin functions: _handle_(general|simple|any)_function_NAME

* builtin methods: _handle_(general|simple|any)_method_TYPENAME_METHODNAME
c                |   V P                  V4       VP                  pVP                  P                  '       g   V# VP                  p\        V\        P                  4      '       g   V# VP                  pV'       d#   \        V\        P                  4      '       g   V# VP                  pV P                  WWT4      # r   )r   r   rd   is_pyobjectpositional_argsr-   r   	TupleNodekeyword_argsDictNoder$  _dispatch_to_handler)r   r3   r   	arg_tupler^  r$  s   &&    r   visit_GeneralCallNode/MethodDispatcherTransform.visit_GeneralCallNode  s    t$==}}(((K((	)Y%8%899K((
<9K9K L LK~~((LLr   c                (   V P                  V4       VP                  pVP                  P                  '       d<   VP                  p\        V\        P                  4      '       g   V# VP                  pMVP                  pV P                  WVR 4      # r   )
r   r   rd   r[  ra  r-   r   r]  r$  r`  )r   r3   r   ra  r$  s   &&   r   visit_SimpleCallNode.MethodDispatcherTransform.visit_SimpleCallNode  sq    t$====$$$Ii)<)<==>>D99D((tDDr   c                n    VP                   '       d   V P                  V4       V# V P                  V4      # r   )cascader   _visit_binop_noder   s   &&r   visit_PrimaryCmpNode.MethodDispatcherTransform.visit_PrimaryCmpNode  s/    <<<""4(K%%d++r   c                $    V P                  V4      # r   )ri  r   s   &&r   visit_BinopNode)MethodDispatcherTransform.visit_BinopNode  s    %%d++r   c           
        V P                  V4       \        VP                  4      pV'       d   VP                  VP                  rCVR 8X  d   YCrCM@VR8X  d:   \
        P                  V P                  4       P                  P                  9   d   RpVP                  pVP                  '       d    VP                  '       g   VP                  pMRpV P                  VRRVVRW4.R4      pV# )rQ  rA  __truediv__objectNF)r   'find_special_method_for_binary_operatoroperatoroperand1operand2r	   divisionr   r   future_directivesrd   is_builtin_typeis_exception_typename_dispatch_to_method_handler)r   r3   special_method_namert  ru  obj_type	type_names   &&     r   ri  +MethodDispatcherTransform._visit_binop_node  s    t$EdmmT!%h"n4%-($	1??d&6&6&8&@&@&R&RR*7'}}H'''0J0J0J$MM	$	33#T5)dX0$8D r   c           
     *   V P                  V4       \        VP                  4      pV'       de   VP                  pVP                  pVP
                  '       d    VP                  '       g   VP                  pMR pV P                  VRRVVRV.R4      pV# )rq  NF)	r   &find_special_method_for_unary_operatorrs  operandrd   rx  ry  rz  r{  )r   r3   r|  r  r}  r~  s   &&    r   visit_UnopNode(MethodDispatcherTransform.visit_UnopNode1  s    t$DT]]SllG||H'''0J0J0J$MM	$	33#T5)dWIt-D r   c                    VP                  4       '       g   R # V'       d   RMRp\        V RV RV 2R 4      pVf   \        V RV 2R 4      pV# )Ngeneralsimple_handle_r   _handle_any_)isasciir#   )r   
match_name
has_kwargs	call_typehandlers   &&&  r   _find_handler'MethodDispatcherTransform._find_handlerB  sW    !!##!+I	$(9+Qzl CTJ?dl:,$?FGr   c                   VP                   ^ ,          pVP                  pVP                  '       d:   VP                  '       d%   \	        VP                  P
                  4      ^8  d   V# M}VP                  '       dj   VP                  P                  '       dN   VP                  P                  '       d/   \	        VP                  P                  P
                  4      ^8  d   V# MV# V P                  WW44      # r   )	cf_staterhsis_nameentryr.   cf_assignmentsis_attributerj   r`  )r   r3   r   arg_listkwargs
assignmentr:   s   &&&&&  r   _delegate_to_assigned_value5MethodDispatcherTransform._delegate_to_assigned_valueM  s    &&q)
===;;;#ekk&@&@"AA"E #F EII$5$5$599???c%))//*H*H&IA&M 'N K((+ 	+r   c                   VP                   '       Ed   VP                  '       g   V# VP                  pVP                  ;'       g9    WPP                  4       P	                  4       P                  VP                  4      J pV'       Eg%   VP                  '       d/   VP                  P                  '       d   V P                  WW44      # V'       d   VP                  '       d   VP                  '       d   VP                  P                  P                  '       d   VP                  P                  P                  '       gk   VP                  P                  V^ ,          P                  J d@   V P!                  VP                  RRVP                  P                  P                  WW4R7      # V# V P#                  RVP                   2V4      pVf   V P%                  WP                  W#V4      # V'       d
   V! WW44      # V! WV4      # VP&                  '       Edd   VP(                  pVP                  P*                  '       d   VP,                  p	MnVP.                  '       d[   VP                  '       dI   VP                  P0                  pV'       d   VP                  '       g   V# VP.                  p	VR,          pMV# V	P                  p
RpV
P                  '       d   V
P                  '       gy   V
\2        P4                  J dO   V	P                   '       d=   V'       d5   V^ ,          P                  P*                  '       d   V	P                  pRp	RpMV
P                  pVR8X  d   RpMR	pV P!                  WWWW44      # V# )
r   NT)self_argis_unbound_methodr~  r3   r   r  r  	function_:r   NNFstrunicoderq  )r  r  
is_builtinr   builtin_scopelookup_hererz  r  	is_singler  
is_cmethodr   parent_typerx  ry  rd   r{  r  _handle_functionr  r[   r[  rj   r   as_variabler   	type_type)r   r3   r   r  r  r  r  function_handler	attr_namer  r}  r  r~  s   &&&&&        r   r`  .MethodDispatcherTransform._dispatch_to_handler]  s    >>>NNE   W W))+99;GGVV  :$$$):):)D)D)D  ;;: :!1!1!1ekkk//???H_H_HqHqHq{{..(1+2B2BB#??!JJ&+kk&=&=&B&B!%8  @  \ \ #11HMM?+V 5',,T==(V\]]'II'AA""" **I}}(((#<<x~~~ 22E$4$4$4K99#B<}}H %'''0J0J0Jw000X5E5E5E(W_`aWbWgWgWsWsWs !)I#H(,% (I% )I$	33%62 2 Kr   c	           	     8   V P                  R V RV 2V4      p	V	fJ   V\        P                  9   g   VR9   d   V P                  RV 2V4      p	V	f   V P                  WTWWsV4      # Ve   V.\	        V4      ,           pV'       d   V	! WVWsV4      p
V
# V	! WVWs4      p
V
# )method_r   slot)__new__r   )r  r   special_method_names_handle_methodr"   )r   r  r  r  r~  r3   r   r  r  method_handlerr   s   &&&&&&&&&  r   r{  5MethodDispatcherTransform._dispatch_to_method_handler  s     ++i[)-v7!Y;;; $<<!%!3!39+&"0%**Y9 9  zDN2H#VEF
  $=Fr   c                    V# zFallback handlerr   )r   r3   function_namer   r  r  s   &&&&&&r   r  *MethodDispatcherTransform._handle_function  s    r   c                    V# r  r   )r   r3   r~  r  r   r  r  r  s   &&&&&&&&r   r  (MethodDispatcherTransform._handle_method  s	     r   r   N)r1   r   r   r   r   rb  re  rj  rm  ri  r  r  r  r`  r{  r  r  r   r   r   s   @r   rY  rY    sO     M
E,,*"	+ DL0 r   rY  c                   B   a a ] tR tRt oRtV 3R ltR tR tRtVt	V ;t
# )RecursiveNodeReplaceri  zM
Recursively replace all occurrences of a node in a subtree by
another node.
c                @   < \         SV `  4        WuV n        V n        R # r   )r   r   	orig_nodenew_node)r   r  r  r   s   &&&r   r   RecursiveNodeReplacer.__init__  s    (1%r   c                    WP                   J d   V P                  # VP                  V P                   J d   V P                  Vn        V# r   )r  r  r'  r   s   &&r   r(  %RecursiveNodeReplacer.visit_CloneNode  s6    >>!== 88t~~%}}DHr   c                ^    V P                  V4       WP                  J d   V P                  # V# r   )r   r  r  r   s   &&r   r    RecursiveNodeReplacer.visit_Node  s)    t$>>!== Kr   )r  r  )r1   r   r   r   r   r   r(  r   r   r   r   r   s   @@r   r  r    s     < r   r  c                 ,    \        W4      pV! V 4       R # r   )r  )treeold_noder  
replace_ins   &&& r   recursively_replace_noder    s    &x:Jtr   c                   <   a a ] tR tRt oRtV 3R ltR tRtVtV ;t	# )
NodeFinderi  z*
Find out if a node appears in a subtree.
c                >   < \         SV `  4        Wn        R V n        R# )FN)r   r   r3   found)r   r3   r   s   &&r   r   NodeFinder.__init__  s    	
r   c                    V P                   '       d   R# WP                  J d
   R V n         R# V P                  VRR4       R# )TN)r  r3   r   r   s   &&r   r   NodeFinder.visit_Node  s1    :::YYDJdD1r   )r  r3   )
r1   r   r   r   r   r   r   r   r   r   r   s   @@r   r  r    s     
2 2r   r  c                 R    \        V4      pVP                  V 4       VP                  # r   )r  rt   r  )r  r3   finders   && r   tree_containsr    s"    F
LL<<r   c                P    V w  r#pVf   \        W#V4       R# V\        W#4      V&   R# )zcReplaces a node. ptr is of the form used on the access path stack
(parent, attrname, listidx|None)
N)r   r#   )ptrr:   rZ   r   listidxs   &&   r   replace_noder    s,     !$Fg%(-2!'*r   c                   \   a  ] tR tRt o RtRR ltR tR tRR ltR t	R	 t
R
 tR tRtV tR# )	PrintTreei  zPrints a representation of the tree to standard output.
Subclass and override repr_of to provide more information
about nodes. Nc                    \         P                  V 4       R V n        Vf   Ve    T;'       g    ^ T;'       g    R3V n        R# RV n        R# )rQ   Ni   @)r   r   _indent_line_range)r   startends   &&&r   r   PrintTree.__init__  sB    T" %

CLL59D#Dr   c                8    V ;P                   R ,          un         R# )z  Nr  r   s   &r   indentPrintTree.indent  s    r   c                .    V P                   R R V n         R # )Nr  r   s   &r   unindentPrintTree.unindent  s    ||CR(r   c                L    \        R V,          4       V P                  V4       V# )zParse tree dump at phase '%s')rg   rt   )r   r  phases   &&&r   r   PrintTree.__call__  s!    -56

4r   c                    V P                  V4       V P                  4        V P                  V4       V P                  4        V# r   )_print_noder  r   r  r   s   &&r   r   PrintTree.visit_Node  s5    4 r   c           	        V P                  V4       V P                  4        VP                  ^,          pV P                  e5   V P                  ^ ,          Tu;8:  d   V P                  ^,          8:  d=   M M9\	        V P
                  : RR: RV P                  VP                  4      : 24       V P                  4        V P                  VP                  4       V P                  4        V P                  4        V# )r   - r'  : )
r  r  r   r  rg   r  repr_ofr'  r   r  )r   r3   lines   && r   r(  PrintTree.visit_CloneNode&  s    xx{#t'7'7':d'YdFVFVWXFY'Y$,,t||DHH7MNO488$r   c           	        VP                   ^,          pV P                  e6   V P                  ^ ,          Tu;8:  d   V P                  ^,          8:  dz   M R# \        V P                  4      ^ 8X  d   RpM'V P                  R,          w  rEpVe   RWV3,          pMTp\	        V P
                  : RV: RV P                  V4      : 24       R# R# )r   Nz(root)z%s[%d]r  r  rc   )r   r  r.   r   rg   r  r  )r   r3   r  rz  rZ   r9   r   s   &&     r   r  PrintTree._print_node2  s    xx{#t'7'7':d'YdFVFVWXFY'Y'Y4##$)$($4$4R$8!c?#tk1DD$,,dll46HIJ (Zr   c           	        Vf   R# VP                   P                  p\        V\        P                  4      '       d2   VR\        VP                  4      : RVP                  : R2,          pV# \        V\        P                  4      '       d   VRVP                  ,          ,          pV# \        V\        P                  4      '       d.   VRVP                  4       : R\        VRR 4      : R2,          pV# \        V\        P                  4      '       d2   VR\        VP                  4      : R	VP                  : R2,          pV# \        V\        P                  \        P                   34      '       d2   VR\        VP                  4      : R
VP"                  : R2,          pV# \        V\        P$                  4      '       d(   VP                  pVR\        V4      ,          ,          pV# VP&                  '       d   VP&                  pV^ ,          P)                  4       pRV9   d   VP+                  R4      R,          pRV9   d   VP+                  R4      R,          pVRV: RV^,          : RV^,          : R2,          pV# )Nz(none)z(type=z, name="z")z(name="%s")z(name="z	", type="rd   z, attribute="z, value=r   z	(type=%s)r@  \z(pos=(r   z))rc   )r   r1   r-   r   NameNoder0   rd   rz  r   DefNodeCFuncDefNodedeclared_namer#   AttributeNoder[   	ConstNodePyConstNoder:   ExprNoder   r'   split)r   r3   r   tr   r%   s   &&    r   r  PrintTree.repr_of?  s   <^^,,F$	 2 233d499otyyQQ, M+ D%--00/DII55( M' D%"4"455&&('$*EG G$ M! D)"9"9::4		?DNN[[ M D9#6#6	8M8M"NOO4		?DJJOO M D)"4"455II+Q// M hh1v--/$;::c?2.D4<::d+B/Dc!ffc!ffEEMr   )r  r  r   r   )r1   r   r   r   r   r   r  r  r   r   r(  r  r  r   r   r   s   @r   r  r    s8     $)
K r   r  __main__)&rT   re   rQ   r   r   r   r   r   r   r	   r   declaretuplebytesr  intfloatcomplexr/   r   r   r   r   r   r!  rA   rr  r  rY  r  r  r  r  r  r  r1   doctesttestmodr   r   r   <module>r     s             ^^EE3UG#DE
F FR=!{ =!@& :0_ 0@E? EP   F+(+(+ 	(+ 	(	+
 	(+ (+ )+ )+ )+ 	.+ 	,+ )+ )+ (+ 	)+  	,!+" )#+$ ).'+( #) (0 
9999	*
 # 'Y Yx, .
2 2"3W Wr zOO r   