Hacked By AnonymousFox
a
R�f � @ 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 �</opt/alt/python39/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)
�selfZnodeZresultsZ
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 ZNodeZsymsZargumentr r"