HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/fix_print.cpython-34.pyc
�
� f&�@s�dZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZej
d�ZGdd	�d	ej�Zd
S)aFixer 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__

�)�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
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|dtjt
jd�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)NZbare�print�prefix��� z>>r�cSsg|]}|j��qS�)�clone)�.0�argrr�</opt/alt/python34/lib64/python3.4/lib2to3/fixes/fix_print.py�
<listcomp>?s	z&FixPrint.transform.<locals>.<listcomp>��sep�end�file���r)�AssertionError�get�replacerrr
Zchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s>
%	%$""zFixPrint.transformcCsrd|_tj|jjt|�tjtjd�|f�}|ra|j	t
��d|_n|j	|�dS)Nr�=r)r
rZNodeZsymsZargumentrr#r�EQUAL�appendr)r'Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr%Ms		zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr)r%rrrrrs(rN)�__doc__rrrZpgen2rrZ
fixer_utilrrrr	r
Zcompile_patternr!ZBaseFixrrrrr�<module>s(