Plan 9 from Bell Labs’s /usr/web/sources/contrib/bichued/root/sys/lib/python/xml/etree/ElementPath.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�
��c@suddkZeid�iZddd��YZddd��YZhZd�Zd�Zdd	�Z
d
�ZdS(
i�NsF(::|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/:\[\]\(\)@=\s]+)|\s+txpath_descendant_or_selfcBseZRS((t__name__t
__module__(((s(/sys/lib/python/xml/etree/ElementPath.pyR<stPathcBs/eZd�Zd�Zdd�Zd�ZRS(cCs�t|�}g|_d|_|o%|dddjotd��nx�o�|id�\}}|p
|djo|ii|p|�nI|djon8|djo|iit��qMntd|��|oA|id�\}}|djotd|p|��q(qMqMW|io't|idt�otd	��nt	|i�d
jo1t|idt
d��o|id|_ndS(Nit/s#cannot use absolute path on elementt*t.sunsupported path syntax (%s)sexpected path separator (%s)i�spath cannot end with //it(txpath_tokenizertpathtNonettagtSyntaxErrortpoptappendRt
isinstancetlenttype(tselfR	ttokenstopR((s(/sys/lib/python/xml/etree/ElementPath.pyt__init__Gs0		



!!3cCsm|i}|djo*|i|�}|pdSn|dSnx&|D]}|i|jo|SqGqGWdS(Ni(RR
tfindall(RtelementRtnodesettelem((s(/sys/lib/python/xml/etree/ElementPath.pytfindgs	
cCs�|i}|djo4|i|�}|p|Sn|dipdSnx0|D](}|i|jo|ipdSqQqQW|S(NiR(RR
Rttext(RRtdefaultRRR((s(/sys/lib/python/xml/etree/ElementPath.pytfindtextvs	
c	
Cs�|g}d}xny|i|}|d}Wntj
o|SnXg}t|t�o�y;|i|}t|td��p
d}n|d}Wntj
o
d}nXx�|D]U}t|i|��}|o&|d|jo|i|d�q�|i|�q�WnQxM|D]E}x<|D]4}|djp|i	|jo|i
|�q,q,WqW|pgSn|}qdS(NiiRR(R	t
IndexErrorRRRR
tlisttgetiteratortextendRR(	RRRtindexR	tsetRtnodetnew((s(/sys/lib/python/xml/etree/ElementPath.pyR�s@	
	

N(RRRRR
RR(((s(/sys/lib/python/xml/etree/ElementPath.pyRBs	 	cCs_ti|�}|dj	o|Snt|�}tt�djoti�n|t|<|S(Nid(t_cachetgetR
RRtclear(R	tp((s(/sys/lib/python/xml/etree/ElementPath.pyt_compile�s

cCst|�i|�S(N(R*R(RR	((s(/sys/lib/python/xml/etree/ElementPath.pyR�scCst|�i||�S(N(R*R(RR	R((s(/sys/lib/python/xml/etree/ElementPath.pyR�scCst|�i|�S(N(R*R(RR	((s(/sys/lib/python/xml/etree/ElementPath.pyR�s(((tretcompileRRRRR&R*RR
R(((s(/sys/lib/python/xml/etree/ElementPath.pys<module>6se	
	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.