o
    f'                     @   sF   d Z g dZddlZefZG dd deZG dd deZ	dd	 Z
dS )
zPython version compatibility support for minidom.

This module contains internal implementation details and
should not be imported; use xml.dom.minidom instead.
)NodeListEmptyNodeListStringTypesdefproperty    Nc                   @   s>   e Zd ZdZdd Zdd Zdd Zeeedd	Zd
d Z	dS )r    c                 C   s(   d|  krt | k r| | S  d S d S Nr   lenselfindexr   r   )/usr/lib/python3.10/xml/dom/minicompat.pyitem5   s   
zNodeList.itemc                 C   s   t | S Nr   r   r   r   r   _get_length9   s   zNodeList._get_lengthc                 C      t jdNz.attempt to modify read-only attribute 'length'xmldomNoModificationAllowedErrr   valuer   r   r   _set_length<      zNodeList._set_length$The number of nodes in the NodeList.docc                 C   s   |d u rg }|| d d < d S r   r   )r   stater   r   r   __setstate__D   s   zNodeList.__setstate__N)
__name__
__module____qualname__	__slots__r   r   r   propertylengthr    r   r   r   r   r   2   s    r   c                   @   sF   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Ze	eeddZ
dS )r   r   c                 C      t  }|| |S r   r   extendr   otherNLr   r   r   __add__M      
zEmptyNodeList.__add__c                 C   r'   r   r(   r*   r   r   r   __radd__R   r.   zEmptyNodeList.__radd__c                 C   s   d S r   r   r
   r   r   r   r   W      zEmptyNodeList.itemc                 C   s   dS r   r   r   r   r   r   r   Z   r0   zEmptyNodeList._get_lengthc                 C   r   r   r   r   r   r   r   r   ]   r   zEmptyNodeList._set_lengthr   r   N)r!   r"   r#   r$   r-   r/   r   r   r   r%   r&   r   r   r   r   r   J   s    
r   c                 C   sR   t | d| }|fdd}t| d| rJ d| t|||d}t| || d S )N_get_c                 S   s   t jdt| )Nz&attempt to modify read-only attribute )r   r   r   repr)r   r   namer   r   r   setg   s   
zdefproperty.<locals>.set_set_zexpected not to find _set_r   )getattrhasattrr%   setattr)klassr3   r   getr4   propr   r   r   r   e   s   r   )__doc____all__xml.domr   strr   listr   tupler   r   r   r   r   r   <module>   s    *