관리-도구
편집 파일: enum.cpython-39.opt-1.pyc
a �����M�ek����������������������@���s>���d�dl�Z�d�dlmZmZmZ�eddd�ZG�dd��de�j�ZdS�)�����N)�Type�TypeVar�Union�TIntEnum�IntEnum)�boundc�������������������@���s����e�Zd�Zedd���Zedd���Zeee�eed�dd��Z eee�e ed�d d ��Zeee�ee ef�ed�dd��Z ed d���Zedd���Zedd���Zedd���Zedd���Zedd���ZdS�)r���c�����������������C���s>���|���|��t�|�|�}|��|d��p0|������|���|_||_|S��N)�_check_value�int�__new__�_extra_to_text�_prefix�_name_�_value_)�cls�value�val��r����,/usr/lib/python3.9/site-packages/dns/enum.py� _missing_���s ���� zIntEnum._missing_c�����������������C���sD���|�����}t|t�st�|dk�s&||kr@|����}t|��d|�����d�S�)Nr���z$ must be an int between >= 0 and <= )�_maximum� isinstancer ���� TypeError�_short_name� ValueError)r���r����max�namer���r���r���r ���!���s���� zIntEnum._check_value)r����text�returnc�����������������C���s����|����}z |�|�W�S��ty$���Y�n0�|��|�}|r8|S�|����}|�|�r�|t|�d������r�t|t|�d����}|��|��z |�|�W�S��t y����|�Y�S�0�|�� ���d�S�r���)�upper�KeyError�_extra_from_textr ���� startswith�len�isdigitr ���r ���r����_unknown_exception_class)r���r���r����prefixr���r���r���� from_text*���s"���� zIntEnum.from_text)r���r���r���c�����������������C���sX���|���|��z|�|�j}W�n�ty.���d�}Y�n0�|��||�}|d�u�rT|������|���}|S�r���)r ���r���r���r���r ���)r���r���r���r���r���r����to_text>���s���� zIntEnum.to_textc�����������������C���s&���t�|t�r|��|�S�|��|��|�|�S�)a���Convert text or a value into an enumerated type, if possible. *value*, the ``int`` or ``str`` to convert. Raises a class-specific exception if a ``str`` is provided that cannot be converted. Raises ``ValueError`` if the value is out of range. Returns an enumeration from the calling class corresponding to the value, if one is defined, or an ``int`` otherwise. )r����strr'���r ���)r���r���r���r���r����makeJ���s���� zIntEnum.makec�����������������C���s���t��d�S�r���)�NotImplementedError�r���r���r���r���r���^���s����zIntEnum._maximumc�����������������C���s ���|�j����S�r���)�__name__�lowerr,���r���r���r���r���b���s����zIntEnum._short_namec�����������������C���s���dS�)N��r���r,���r���r���r���r ���f���s����zIntEnum._prefixc�����������������C���s���d�S�r���r���)r���r���r���r���r���r!���j���s����zIntEnum._extra_from_textc�����������������C���s���|S�r���r���)r���r���Zcurrent_textr���r���r���r���n���s����zIntEnum._extra_to_textc�����������������C���s���t�S�r���)r���r,���r���r���r���r%���r���s����z IntEnum._unknown_exception_classN)r-���� __module__�__qualname__�classmethodr���r ���r���r���r)���r'���r ���r(���r���r*���r���r���r ���r!���r���r%���r���r���r���r���r������s,��� )�enum�typingr���r���r���r���r���r���r���r���r����<module>���s���