관리-도구
편집 파일: genshi.cpython-36.pyc
3 �Re� � @ sL d dl mZmZmZ d dlmZmZ d dlmZmZm Z m Z mZ dd� ZdS )� )�absolute_import�division�unicode_literals)�QName�Attrs)�START�END�TEXT�COMMENT�DOCTYPEc c sZ g }�x6| D �],}|d }|dkr2|j |d � n|rLtdj|�dfV g }|dkr�|d rrd|d |d f }n|d }td d� |d j� D ��}tt|�|fdfV |d kr�d}|dk� r�|d r�d|d |d f }n|d }tt|�dfV q|dk�rt|d d!fV q|dkrt |d |d |d fd$fV qqW |�rVtdj|�d'fV dS )(z�Convert a tree to a genshi tree :arg walker: the treewalker to use to walk the tree to convert it :returns: generator of genshi nodes �type� Characters�SpaceCharacters�data� N� �StartTag�EmptyTag� namespacez{%s}%s�namec S s4 g | ],\}}t |d dk r"d| n|d �|f�qS )r Nz{%s}%sr )r )�.0�attr�value� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py� <listcomp> s zto_genshi.<locals>.<listcomp>�EndTag�Comment�Doctype�publicId�systemId)r r ���r! )Nr! r! )r r r! r! )Nr! r! r! r! )Nr! r! r! r! )Nr! r! r! r! )Nr! r! r! r! )Nr! r! ) �appendr �joinr �itemsr r r r r )�walker�text�tokenr r �attrsr r r � to_genshi s<