Hacked By AnonymousFox
�
�Q�f�
� �^ � d Z ddlmZ ddlmZmZmZ ddlmZ G d� dej � Z y)z/Fixer that changes xrange(...) into range(...).� )�
fixer_base)�Name�Call�consuming_calls)�patcompc � � � e Zd ZdZdZ� fd�Zd� Zd� Zd� Zd� Z dZ
ej e
� Z
d Z ej e� Zd
� Z� xZS )� FixXrangeTz�
power<
(name='range'|name='xrange') trailer< '(' args=any ')' >
rest=any* >
c �L �� t t | � ||� t � | _ y �N)�superr �
start_tree�set�transformed_xranges)�self�tree�filename� __class__s ��?/opt/alt/python312/lib64/python3.12/lib2to3/fixes/fix_xrange.pyr
zFixXrange.start_tree s �� �
�i��)�$��9�#&�5�� � c � � d | _ y r )r )r r r s r �finish_treezFixXrange.finish_tree s
� �#'�� r c � � |d }|j dk( r| j ||� S |j dk( r| j ||� S t t |� � �)N�name�xrange�range)�value�transform_xrange�transform_range�
ValueError�repr�r �node�resultsr s r � transformzFixXrange.transform sX � ��v����:�:��!��(�(��w�7�7�
�Z�Z�7�
"��'�'��g�6�6��T�$�Z�(�(r c � � |d }|j t d|j �� � | j j t |� � y )Nr r ��prefix)�replacer r'