File: //lib/python3/dist-packages/twisted/python/__pycache__/util.cpython-312.pyc
�
�b(k � �^ � d dl Z d dlZd dlZd dlZ d dlZd dlZeZeZ d dlm Z
mZ eZe
Z d dl
mZ d dlmZmZmZmZmZmZmZmZ d dlmZ d dlmZ e eddd d � d
dd� G d
� de� Zd� Zd2d�Zd� Zd� Z d� Z!d� Z" d3d�Z#d� Z$d� Z%d4d�Z&d� Z'g g fd�Z( G d� d� Z)d� Z* G d� d� Z+ G d � d!� Z, G d"� d#� Z- G d$� d%� Z. d d&lm/Z0 e0Z1e1�d'� Z/nd(� Z/d5d)�Z2d*� Z3d+� Z4d,� Z5d-� Z6d.� Z7d/� Z8d0� Z9g d1�Z:y# e$ r dZdZY ��w xY w# e$ r dZdZ Y ��w xY w# e$ r dZ1Y �Nw xY w)6� N)� getgroups� setgroups)�OrderedDict)�Callable�ClassVar�Mapping�MutableMapping�Sequence�Tuple�Union�cast)�Version)�deprecatedModuleAttribute�Twisted� � z$Use collections.OrderedDict instead.ztwisted.python.utilr c �� � � e Zd ZdZ d� fd� Zd� Zd� Zd� Zd� Zd� Z e Z
d� Zd � Zd
� Z
d� Zdd�Zd
� Zd� Zdefd�Zd� ZeZd� Zd� Z e� Zefd�Zd� Zd� Zd� Zd� Zdedefd�Z � xZ!S )�InsensitiveDicta
Dictionary, that has case-insensitive keys.
Normally keys are retained in their original form when queried with
.keys() or .items(). If initialized with preserveCase=0, keys are both
looked up in lowercase and returned in lowercase by .keys() and .items().
c �f �� t �| � � i | _ || _ |r| j |� yy)zD
Create an empty dictionary, or update from 'dict'.
N)�super�__init__�data�preserve�update)�self�dictr � __class__s ��5/usr/lib/python3/dist-packages/twisted/python/util.pyr zInsensitiveDict.__init__E s2 �� � ������ � ��
���K�K��� � c �@ � | j |� }| j |= y �N��_lowerOrReturnr �r �key�ks r �__delitem__zInsensitiveDict.__delitem__O s � �����$���I�I�a�Lr c �f � t |t � st |t � r|j � S |S r! )�
isinstance�bytes�str�lower�r r% s r r# zInsensitiveDict._lowerOrReturnS s&