Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/lib2to3/fixes/fix_paren.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@sIdZddlmZddlmZmZdejfd��YZdS(suFixer 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(tLParentRParentFixParencBseZeZdZd�ZRS(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]
                >
            >)
        (']' | ')') >
    cCsL|d}t�}|j|_d|_|jd|�|jt��dS(Nttargetui(Rtprefixtinsert_childtappend_childR(tselftnodetresultsRtlparen((s-/sys/lib/python2.7/lib2to3/fixes/fix_paren.pyt	transform%s
		(t__name__t
__module__tTruet
BM_compatibletPATTERNR(((s-/sys/lib/python2.7/lib2to3/fixes/fix_paren.pyRsN(t__doc__tRt
fixer_utilRRtBaseFixR(((s-/sys/lib/python2.7/lib2to3/fixes/fix_paren.pyt<module>s

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.