HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //lib/python3.10/lib2to3/fixes/__pycache__/fix_print.cpython-310.pyc
o

��bc�@sldZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZe�d�Z
Gdd	�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�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs�|sJ�|�d�}|r|�ttd�g|jd��dS|jdtd�ks%J�|jdd�}t|�dkr;t�|d�r;dSd}}}|rR|dt	�krR|dd�}d}|rs|dt
�tj
d�krst|�d	ksgJ�|d��}|d
d�}dd�|D�}|r�d
|d_|dus�|dus�|dur�|dur�|�|dtt|���|dur�|�|dtt|���|dur�|�|d|�ttd�|�}	|j|	_|	S)N�bare�print)�prefix������ z>>r�cSsg|]}|���qS�)�clone)�.0�argrr�./usr/lib/python3.10/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file)�get�replacerrr
�children�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�self�node�results�
bare_print�argsrrr�l_args�n_stmtrrr�	transform%s@
�
zFixPrint.transformcCsNd|_t�|jjt|�t�tjd�|f�}|r |�	t
��d|_|�	|�dS)Nr�=r)r
r�Node�syms�argumentrr#r�EQUAL�appendr)r'�l_nodes�s_kwd�n_expr�
n_argumentrrrr%Ms
��zFixPrint.add_kwargN)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr.r%rrrrr
s
(r
N)�__doc__rrr�pgen2rr�
fixer_utilrrrr	�compile_patternr!�BaseFixr
rrrr�<module>s
�