a
    If'                     @   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$n n| | S d S Nr   lenselfindexr   r   #lib/python3.9/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   s   t jdd S Nz.attempt to modify read-only attribute 'length'xmldomNoModificationAllowedErrr   valuer   r   r   _set_length<   s    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   s   t  }|| |S r   r   extendr   otherNLr   r   r   __add__M   s    
zEmptyNodeList.__add__c                 C   s   t  }|| |S r   r%   r'   r   r   r   __radd__R   s    
zEmptyNodeList.__radd__c                 C   s   d S r   r   r
   r   r   r   r   W   s    zEmptyNodeList.itemc                 C   s   dS r   r   r   r   r   r   r   Z   s    zEmptyNodeList._get_lengthc                 C   s   t jdd S r   r   r   r   r   r   r   ]   s    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| r4J d| t|||d}t| || d S )NZ_get_c                 S   s   t jdt| d S )Nz&attempt to modify read-only attribute )r   r   r   repr)r   r   namer   r   r   setg   s    
zdefproperty.<locals>.setZ_set_zexpected not to find _set_r   )getattrhasattrr#   setattr)klassr-   r   getr.   Zpropr   r   r   r   e   s    r   )__doc____all__Zxml.domr   strr   listr   tupler   r   r   r   r   r   <module>   s   *