Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/construct/lib/__pycache__/containers.cpython-39.pyc
Ðазад
a h�h�) � @ s� d dl T d dlZd dlZd dlZeZejdk r4ejZdadada ddd�Z ddd�Zdd d �Zdd d�Z G dd� de�ZG dd� de�ZdS )� )�*N)� � Fc C s | a dS )z� When enabled, Container __str__ produces full content of bytes and unicode strings, otherwise and by default, it produces truncated output (16 bytes and 32 characters). :param enabled: bool N)�globalPrintFullStrings��enabled� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/construct/lib/containers.py�setGlobalPrintFullStrings s r c C s | a dS )z� When enabled, Container __str__ that was produced by FlagsEnum parsing prints all values, otherwise and by default, it prints only the values that are True. :param enabled: bool N)�globalPrintFalseFlagsr r r r �setGlobalPrintFalseFlags s r c C s | a dS )z� When enabled, Container __str__ shows keys like _ _index _etc, otherwise and by default, it hides those keys. __repr__ never shows private entries. :param enabled: bool N)�globalPrintPrivateEntriesr r r r �setGlobalPrintPrivateEntries$ s r �<recursion detected>�__recursion_lock__c s � �fdd�}|S )zUsed internally.c s � ��fdd�}� j |_ |S )Nc sP t | �d�r�S t| �d� z"� | g|�R i |��W t| �� S t| �� 0 d S )NFT)�getattr�setattr�delattr)�self�args�kw)�func� lock_name�retvalr r �wrapper1 s �z2recursion_lock.<locals>.decorator.<locals>.wrapper)�__name__)r r �r r )r r � decorator0 s z!recursion_lock.<locals>.decoratorr )r r r r r r �recursion_lock. s r c s� e Zd ZdZdgZdd� Zdd� Zdd� Zd d � Zdd� Z eZ e Z� fd d�Zdd� Z dd� Ze� dd� �Ze� dd� �Zdd� Zdd� Zdd� Zdd� Zdd � Z� ZS )!� Containera� Generic ordered dictionary that allows both key and attribute access, and preserves key order by insertion. Adding keys is preferred using \*\*entrieskw (requires Python 3.6). Equality does NOT check item order. Also provides regex searching. Note that not all parameters can be accessed via attribute access (dot operator). If the name of an item matches a method name of the Container, it can only be accessed via key acces (square brackets). This includes the following names: clear, copy, fromkeys, get, items, keys, move_to_end, pop, popitem, search, search_all, setdefault, update, values. Example:: # empty dict >>> Container() # list of pairs, not recommended >>> Container([ ("name","anonymous"), ("age",21) ]) # This syntax requires Python 3.6 >>> Container(name="anonymous", age=21) # copies another dict >>> Container(dict2) >>> Container(container2) :: >>> print(repr(obj)) Container(text='utf8 decoded string...', value=123) >>> print(obj) Container text = u'utf8 decoded string...' (total 22) value = 123 r c C sF z&|| j v rt�| |�W S | | W S W n ty@ t|��Y n0 d S �N)� __slots__�object�__getattribute__�KeyError�AttributeError�r �namer r r �__getattr__] s zContainer.__getattr__c C sF z&|| j v rt�| ||�W S || |<