3 \' ã@sJdZddddgZddlZefZGdd„deƒZGdd„deƒZ d d„Z dS) 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>eZdZfZdd„Zdd„Zdd„Zeeedd�Zd d „Z d S) rcCs(d|kot|ƒknr$||SdS)Nr)Úlen)ÚselfÚindex©r ú*/usr/lib64/python3.6/xml/dom/minicompat.pyÚitem5sz NodeList.itemcCst|ƒS)N)r)rr r r Ú _get_length9szNodeList._get_lengthcCstjjdƒ‚dS)Nz.attempt to modify read-only attribute 'length')ÚxmlÚdomÚNoModificationAllowedErr)rÚvaluer r r Ú _set_length<szNodeList._set_lengthz$The number of nodes in the NodeList.)ÚdoccCs|dkr g}||dd…<dS)Nr )rÚstater r r Ú __setstate__DszNodeList.__setstate__N) Ú__name__Ú __module__Ú __qualname__Ú __slots__r r rÚpropertyÚlengthrr r r r r2sc@sFeZdZfZdd„Zdd„Zdd„Zdd„Zd d „Ze eed d �Z d S)rcCstƒ}|j|ƒ|S)N)rÚextend)rÚotherÚNLr r r Ú__add__Ms zEmptyNodeList.__add__cCstƒ}|j|ƒ|S)N)rr)rrrr r r Ú__radd__Rs zEmptyNodeList.__radd__cCsdS)Nr )rrr r r r WszEmptyNodeList.itemcCsdS)Nrr )rr r r r ZszEmptyNodeList._get_lengthcCstjjdƒ‚dS)Nz.attempt to modify read-only attribute 'length')r rr)rrr r r r]szEmptyNodeList._set_lengthz$The number of nodes in the NodeList.)rN) rrrrrrr r rrrr r r r rJscCs8t|d|ƒ}|fdd„}t|||d�}t|||ƒdS)NZ_get_cSstjjdt|ƒƒ‚dS)Nz&attempt to modify read-only attribute )r rrÚrepr)rrÚnamer r r Úsetgszdefproperty..set)r)ÚgetattrrÚsetattr)Úklassr!rÚgetr"Zpropr r r res ) Ú__doc__Ú__all__Zxml.domr ÚstrrÚlistrÚtuplerrr r r r Ús &