ok
Direktori : /proc/thread-self/root/lib64/python2.7/lib2to3/fixes/ |
Current File : //proc/thread-self/root/lib64/python2.7/lib2to3/fixes/fix_xrange.pyo |
� {fc @ s_ d Z d d l m Z d d l m Z m Z m Z d d l m Z d e j f d � � YZ d S( s/ Fixer that changes xrange(...) into range(...).i ( t fixer_base( t Namet Callt consuming_calls( t patcompt FixXrangec B st e Z e Z d Z d � Z d � Z d � Z d � Z d � Z d Z e j e � Z d Z e j e � Z d � Z RS( s� power< (name='range'|name='xrange') trailer< '(' args=any ')' > rest=any* > c C s) t t | � j | | � t � | _ d S( N( t superR t start_treet sett transformed_xranges( t selft treet filename( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_xrange.pyR s c C s d | _ d S( N( t NoneR ( R R R ( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_xrange.pyt finish_tree s c C s^ | d } | j d k r) | j | | � S| j d k rH | j | | � St t | � � � d S( Nt nameu xrangeu range( t valuet transform_xranget transform_ranget ValueErrort repr( R t nodet resultsR ( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_xrange.pyt transform s c C s@ | d } | j t d d | j �� | j j t | � � d S( NR u ranget prefix( t replaceR R R t addt id( R R R R ( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_xrange.pyR $ s c C s� t | � | j k r� | j | � r� t t d � | d j � g � } t t d � | g d | j �} x | d D] } | j | � qs W| Sd S( Nu ranget argsu listR t rest( R R t in_special_contextR R t cloneR t append_child( R R R t range_callt list_callt n( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_xrange.pyR * s "s3 power< func=NAME trailer< '(' node=any ')' > any* >s� for_stmt< 'for' any 'in' node=any ':' any* > | comp_for< 'for' any 'in' node=any any* > | comparison< any 'in' node=any any*> c C s� | j d k r t Si } | j j d k rg | j j | j j | � rg | d | k rg | d j t k S| j j | j | � o� | d | k S( NR t func( t parentR t Falset p1t matchR R t p2( R R R ( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_xrange.pyR ? s ( t __name__t __module__t Truet BM_compatiblet PATTERNR R R R R t P1R t compile_patternR'