Your IP : 3.135.249.119


Current Path : /opt/alt/python33/lib64/python3.3/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/lib2to3/fixes/__pycache__/fix_print.cpython-33.pyc

�
��f&c@s�dZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZej
d�ZGdd	�d	ej�Zd
S(uFixer for print.

Change:
    'print'          into 'print()'
    'print ...'      into 'print(...)'
    'print ... ,'    into 'print(..., end=" ")'
    'print >>x, ...' into 'print(..., file=x)'

No changes are applied if print_function is imported from __future__

i(upatcomp(upytree(utoken(u
fixer_base(uNameuCalluCommauStringuis_tupleu"atom< '(' [atom|STRING|NAME] ')' >cBs8|EeZdZdZdZdd�Zdd�ZdS(uFixPrintuP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs8|st�|jd�}|rJ|jttd�gd|j��dS|jdtd�ksit�|jdd�}t|�dkr�tj	|d�r�dSd}}}|r�|dt�kr�|dd�}d}n|rE|dtj
tjd�krEt|�dks"t�|dj�}|d	d�}nd
d�|D�}|rnd|d_n|dk	s�|dk	s�|dk	r|dk	r�|j|d
tt|���n|dk	r�|j|dtt|���n|dk	r|j|d|�qnttd�|�}	|j|	_|	S(Nubareuprintuprefixiiu u>>iicSsg|]}|j��qS((uclone(u.0uarg((u</opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_print.pyu
<listcomp>?s	u&FixPrint.transform.<locals>.<listcomp>uusepuendufilei����i����(uAssertionErrorugetureplaceuCalluNameuprefixuchildrenulenuparend_exprumatchuNoneuCommaupytreeuLeafutokenu
RIGHTSHIFTucloneu	add_kwarguStringurepr(
uselfunodeuresultsu
bare_printuargsusepuendufileul_argsun_stmt((u</opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_print.pyu	transform%s>
%	%$""uFixPrint.transformcCsrd|_tj|jjt|�tjtjd�|f�}|ra|j	t
��d|_n|j	|�dS(Nuu=u (uprefixupytreeuNodeusymsuargumentuNameuLeafutokenuEQUALuappenduComma(uselful_nodesus_kwdun_expru
n_argument((u</opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_print.pyu	add_kwargMs		uFixPrint.add_kwargNT(u__name__u
__module__u__qualname__uTrueu
BM_compatibleuPATTERNu	transformu	add_kwarg(u
__locals__((u</opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_print.pyuFixPrints(uFixPrintN(u__doc__uupatcompupytreeupgen2utokenu
fixer_baseu
fixer_utiluNameuCalluCommauStringuis_tupleucompile_patternuparend_expruBaseFixuFixPrint(((u</opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_print.pyu<module>s(	

?>