
–àW'  ã               @   si   d  Z  d d d d g Z d d l Z e f Z Gd d „  d e ƒ Z Gd d „  d e ƒ Z	 d	 d „  Z
 d S)
z¡Python 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 f  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 o t  |  ƒ k  n r* |  | Sd  S)Nr   )Úlen)ÚselfÚindex© r	   ú?/afs/.cs/s/python-3.5.2/amd64_ubu14/lib/python3.5/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 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Údocz$The number of nodes in the NodeList.c             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               @   sg   e  Z d  Z f  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   c             C   s   t  ƒ  } | j | ƒ | S)N)r   Úextend)r   ÚotherÚNLr	   r	   r
   Ú__add__M   s    	zEmptyNodeList.__add__c             C   s   t  ƒ  } | j | ƒ | 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 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_lengthr   z$The number of nodes in the NodeList.N)r   r   r   r   r   r   r   r   r   r   r   r	   r	   r	   r
   r   J   s   c             C   sK   t  |  d | ƒ } | d d „ } t | | d | ƒ} t |  | | ƒ d  S)NZ_get_c             S   s    t  j 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>.setr   )Úgetattrr   Ú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   &	