AlkantarClanX12

Your IP : 3.144.255.116


Current Path : /opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/fix_xrange.cpython-311.opt-2.pyc

�

c��f�
��Z�	ddlmZddlmZmZmZddlmZGd�dej��ZdS)�)�
fixer_base)�Name�Call�consuming_calls)�patcompc���eZdZdZdZ�fd�Zd�Zd�Zd�Zd�Z	dZ
eje
��Z
d	Zeje��Zd
�Z�xZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              c���tt|���||��t��|_dS�N)�superr	�
start_tree�set�transformed_xranges)�self�tree�filename�	__class__s   ��?/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_xrange.pyr
zFixXrange.start_trees5���
�i����)�)�$��9�9�9�#&�5�5�� � � �c��d|_dSr)r)rrrs   r�finish_treezFixXrange.finish_trees��#'�� � � rc���|d}|jdkr|�||��S|jdkr|�||��Stt	|�����)N�name�xrange�range)�value�transform_xrange�transform_range�
ValueError�repr�r�node�resultsrs    r�	transformzFixXrange.transformse���v����:��!�!��(�(��w�7�7�7�
�Z�7�
"�
"��'�'��g�6�6�6��T�$�Z�Z�(�(�(rc��|d}|�td|j�����|j�t|����dS)Nrr��prefix)�replacerr'r�add�idr!s    rrzFixXrange.transform_xrange$sO���v������T�'�$�+�6�6�6�7�7�7�� �$�$�R��X�X�.�.�.�.�.rc�Z�t|��|jvr�|�|��stt	d��|d���g��}tt	d��|g|j���}|dD]}|�|���|SdSdS)Nr�args�listr&�rest)r*r�in_special_contextrr�cloner'�append_child)rr"r#�
range_call�	list_call�ns      rrzFixXrange.transform_range*s����t�H�H�D�4�4�4��'�'��-�-�
5��d�7�m�m�g�f�o�.C�.C�.E�.E�-F�G�G�J��T�&�\�\�J�<�$(�K�1�1�1�I��V�_�
*�
*���&�&�q�)�)�)�)���
5�4�4�4rz3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         c�
�|j�dSi}|jj�C|j�|jj|��r|d|ur|djtvS|j�|j|��o	|d|uS)NFr"�func)�parent�p1�matchrr�p2)rr"r#s   rr/zFixXrange.in_special_context?s����;���5����K��*��w�}�}�T�[�/��9�9�
+��v��$�&�&��6�?�(�O�;�;��w�}�}�T�[�'�2�2�N�w�v��$�7N�Nr)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr
rr$rr�P1r�compile_patternr8�P2r:r/�
__classcell__)rs@rr	r	s���������M��G�)�)�)�)�)�(�(�(�)�)�)�/�/�/�
�
�
�
?�B�	 ��	 ��	$�	$�B�

�B�
!��	 ��	$�	$�B�
O�
O�
O�
O�
O�
O�
Orr	N)	�r�
fixer_utilrrrr�BaseFixr	�rr�<module>rHs���6�������4�4�4�4�4�4�4�4�4�4�������=O�=O�=O�=O�=O�
�"�=O�=O�=O�=O�=Or