| Server IP : 65.109.86.83 / Your IP : 216.73.216.54 Web Server : nginx/1.14.1 System : Linux libra 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 20:24:04 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.31 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib64/python3.9/lib2to3/fixes/__pycache__/ |
Upload File : |
a
�i � @ sh d dl mZ d dl mZ d dlmZ d dl mZ d dlmZmZm Z m
Z
e�d�ZG dd� dej
�Zd S )
� )�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c @ s$ e Zd ZdZdZdd� Zdd� ZdS )�FixPrintTzP
simple_stmt< any* bare='print' any* > | print_stmt
c
C s` |� d�}|r,|�ttd�g |jd�� d S |jdd � }t|�dkrXt�|d �rXd S d } }}|r�|d t � kr�|d d� }d}|r�|d t
�tj
d�kr�|d �� }|d d � }d
d� |D �}|r�d|d _|d us�|d us�|d u�rF|d u�r| �|d
tt|��� |d u�r.| �|dtt|��� |d u�rF| �|d|� ttd�|�} |j| _| S )NZbare�print)�prefix� � ���� z>>� c S s g | ]}|� � �qS � )�clone)�.0�argr r �//usr/lib64/python3.9/lib2to3/fixes/fix_print.py�
<listcomp>? � z&FixPrint.transform.<locals>.<listcomp>� �sep�end�file)�get�replacer r r Zchildren�len�parend_expr�matchr r �Leafr �
RIGHTSHIFTr � add_kwargr �repr)
�selfZnode�resultsZ
bare_print�argsr r r Zl_argsZn_stmtr r r � transform% s:
�
zFixPrint.transformc C sN d|_ t�| jjt|�t�tjd�|f�}|r@|� t
� � d|_ |� |� d S )Nr �=r )r r ZNodeZsyms�argumentr r"