Viewing File: /opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/fix_print.cpython-35.opt-2.pyc



й¼]&ã@s”ddlmZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZejdƒZ
Gdd„dejƒZd	S)
é)Úpatcomp)Úpytree)Útoken)Ú
fixer_base)ÚNameÚCallÚCommaÚStringÚis_tuplez"atom< '(' [atom|STRING|NAME] ')' >c@s4eZdZdZdZdd„Zdd„ZdS)ÚFixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Csà|jdƒ}|r>|jttdƒgd|jƒƒdS|jdd…}t|ƒdkrztj|dƒrzdSd}}}|r·|dt	ƒkr·|dd…}d}|rü|dt
jtj
dƒkrü|djƒ}|dd…}d	d
„|Dƒ}|r"d|d_|dk	sF|dk	sF|dk	r»|dk	rq|j|dtt|ƒƒƒ|dk	rœ|j|d
tt|ƒƒƒ|dk	r»|j|d|ƒttdƒ|ƒ}	|j|	_|	S)NZbareÚprintÚprefixééú z>>écSsg|]}|jƒ‘qS©)Úclone)Ú.0Úargrrú./opt/alt/python35/lib64/python3.5/fix_print.pyú
<listcomp>?s	z&FixPrint.transform.<locals>.<listcomp>ÚÚsepÚendÚfileéÿÿÿÿr)ÚgetÚreplacerrr
ZchildrenÚlenÚparend_exprÚmatchrrÚLeafrÚ
RIGHTSHIFTrÚ	add_kwargr	Úrepr)
ÚselfZnodeÚresultsZ
bare_printÚargsrrrZl_argsZn_stmtrrrÚ	transform%s8
%%
$zFixPrint.transformcCsod|_tj|jjt|ƒtjtjdƒ|fƒ}|r^|j	t
ƒƒd|_|j	|ƒdS)Nrú=r)r
rZNodeZsymsÚargumentrr"rÚEQUALÚappendr)r&Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr$Ms			zFixPrint.add_kwargN)Ú__name__Ú
__module__Ú__qualname__Z
BM_compatibleZPATTERNr)r$rrrrrs(rN)rrrZpgen2rrZ
fixer_utilrrrr	r
Zcompile_patternr ZBaseFixrrrrrÚ<module>s(	
Back to Directory File Manager