|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /proc/self/root/opt/alt-old/python27/lib64/python2.7/lib2to3/fixes/ |
Upload File : |
�
MrMac @ sI d Z d d l m Z d d l m Z m Z d e j f d � � YZ d S( su Fixer that addes parentheses where they are required
This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.i ( t
fixer_base( t LParent RParent FixParenc B s e Z e Z d Z d � Z RS( s
atom< ('[' | '(')
(listmaker< any
comp_for<
'for' NAME 'in'
target=testlist_safe< any (',' any)+ [',']
>
[any]
>
>
|
testlist_gexp< any
comp_for<
'for' NAME 'in'
target=testlist_safe< any (',' any)+ [',']
>
[any]
>
>)
(']' | ')') >
c C sL | d } t � } | j | _ d | _ | j d | � | j t � � d S( Nt targetu i ( R t prefixt insert_childt append_childR ( t selft nodet resultsR t lparen( ( s<