← Back
Editing: _bunch.cpython-311.pyc
� d�c� � �, � d dl Zd dlmZ d� Z dd�ZdS )� N)� iskeywordc �� � | g|z |z D ]n}t |� � t urt d� � �|� � � st d|��� � �t |� � rt d|��� � ��ot � � }||z D ]T}|� d� � rt d|��� � �||v rt d|��� � �|� |� � �UdS )z� Ensure that all the given names are valid Python identifiers that do not start with '_'. Also check that there are no duplicates among field_names + extra_field_names. z,typename and all field names must be stringsz8typename and all field names must be valid identifiers: z2typename and all field names cannot be a keyword: �_z-Field names cannot start with an underscore: zDuplicate field name: N) �type�str� TypeError�isidentifier� ValueError� _iskeyword�set� startswith�add)�typename�field_names�extra_field_names�name�seens �3/usr/lib/python3/dist-packages/scipy/_lib/_bunch.py�_validate_namesr sD � � � �[�(�+<�<� 3� 3����:�:�S� � ��J�K�K�K�� � �"�"� 7�� 6�-1�6� 6� 7� 7� 7��d��� 3�� 2�)-�2� 2� 3� 3� 3� 3� �5�5�D��/�/� � ���?�?�3��� *�� )� $�)� )� *� *� *��4�<�<��>�d�>�>�?�?�?��������� � � c �R ����� t |� � dk rt d� � �|�g }t | ||� � t j t | � � � � } t t t j |� � � � }t t t j |� � � � }||z }d� |� � }d� |� � }d� dd� d� |D � � � � df� � �t j }t t t c���d |� d |� d|� dt |� � � d � }~|t t t �� � d| � �d�} t || � � | d } d| � d|� d�| _ | d }d| � d|� d�|_ | d }�fd�} ��fd�}�fd�}| | ||fD ]}| � d|j � �|_ �| � d|� d�|| || ||||d� }t'