관리-도구
편집 파일: _tuple.cpython-38.pyc
U )�e�J � @ sF d dl T d dlmZ ddlZddgZG dd� de�ZG d d � d e�Z G dd� de�Z e � Z G d d� de�ZG dd� de�Z ee �def�de� d�Zedd� �Zedd� �Zedd� �Zedd� �Zeedd� ��Zeedd� ��Zeedd� ��Zeed(d d!���Zed"d#� �Zed$d%� �Zeed&d'� ��Ze defe�� �Z [dS ))� )�*)� NamedConstant� N� TupleSize� NamedTuplec s, e Zd ZdZ� fdd�Z� fdd�Z� ZS )�NamedTupleDictz�Track field order and ensure field names are not reused. NamedTupleMeta will use the names found in self._field_names to translate to indices. c s g | _ tt| �j||� d S �N)�_field_names�superr �__init__)�self�args�kwds�� __class__� �:/opt/hc_python/lib/python3.8/site-packages/aenum/_tuple.pyr s zNamedTupleDict.__init__c s� t |�r |dkr�td|f ��n`t|�r6|dkr�d}nJ|| jkrPtd|f ��n0t|�s�|| krttd|| | f ��| j�|� tt| �� ||� dS )z�Records anything not dundered or not a descriptor. If a field name is used twice, an error is raised. Single underscore (sunder) names are reserved. )�_size_�_order_�_fields_�_review_zB_sunder_ names, such as %r, are reserved for future NamedTuple use� __order__r zattempt to reuse field name: %rz%s already defined as: %rN) Z is_sunder� ValueErrorZ is_dunderr � TypeErrorZ is_descriptor�appendr r �__setitem__)r �key�valuer r r r s"