관리-도구
편집 파일: genshi.cpython-39.pyc
a ��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 sR g }| D �]*}|d }|dv r.|� |d � n|rHtd�|�dfV g }|dv r�|d rnd|d |d f }n|d }td d� |d �� D ��}tt|�|fdfV |dkr�d }|d kr�|d r�d|d |d f }n|d }tt|�dfV q|dk�rt|d dfV q|dkrt |d |d |d fdfV qq|�rNtd�|�dfV 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���r )�StartTag�EmptyTag� namespace�{%s}%s�namec S s4 g | ],\}}t |d dur"d| n|d �|f�qS )r Nr � )r )�.0�attr�value� r ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py� <listcomp> s �zto_genshi.<locals>.<listcomp>r �EndTag�Comment�Doctype�publicId�systemIdN) �appendr �joinr �itemsr r r r r )�walker�text�tokenr r �attrsr r r � to_genshi sD � ��r* N) � __future__r r r Zgenshi.corer r r r r r r r* r r r r �<module> s