관리-도구
편집 파일: grange.cpython-38.pyc
U /?�fd � @ s6 d Z ddlmZ ddlZeeeeef d�dd�ZdS )zDNS GENERATE range conversion.� )�TupleN)�text�returnc C s d}d}d}d}d}| r0| d dkr0t j�d��| D ]b}|dkrZ|dkrZt|�}d}d}q4|dkrtt|�}d}d}q4|�� r�||7 }q4t j�d | ��q4|dkr�t j�d ��n&|dkr�t|�}n|dks�t�t|�}|dks�t�|dks�t�||k�rt j�d��|||fS )z�Convert the text form of a range in a ``$GENERATE`` statement to an integer. *text*, a ``str``, the textual range in ``$GENERATE`` form. Returns a tuple of three ``int`` values ``(start, stop, step)``. ���� � r �-z!Start cannot be a negative number�/� zCould not parse %szno stop value specifiedzstart must be <= stop)�dns� exception�SyntaxError�int�isdigit�AssertionError)r �start�stop�step�cur�state�c� r �8/opt/hc_python/lib/python3.8/site-packages/dns/grange.py� from_text s<