B
     S]'                 @   sJ   d Z ddddg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.7/xml/dom/minicompat.pyitem5   s    zNodeList.itemc             C   s   t | S )N)r   )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_lengthz$The number of nodes in the NodeList.)docc             C   s   |d krg }|| d d < d S )Nr   )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   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 )N)r   extend)r   otherNLr   r   r
   __add__M   s    
zEmptyNodeList.__add__c             C   s   t  }|| |S )N)r   r   )r   r   r   r   r   r
   __radd__R   s    
zEmptyNodeList.__radd__c             C   s   d S )Nr   )r   r	   r   r   r
   r   W   s    zEmptyNodeList.itemc             C   s   dS )Nr   r   )r   r   r   r
   r   Z   s    zEmptyNodeList._get_lengthc             C   s   t jdd S )Nz.attempt to modify read-only attribute 'length')r   r   r   )r   r   r   r   r
   r   ]   s    zEmptyNodeList._set_lengthz$The number of nodes in the NodeList.)r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   J   s   c             C   sR   t | d| }|fdd}t| d| r4t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hasattrAssertionErrorr   setattr)klassr!   r   getr"   Zpropr   r   r
   r   e   s    
)__doc____all__Zxml.domr   strr   listr   tupler   r   r   r   r   r
   <module>   s   &