관리-도구
편집 파일: genshi.cpython-36.pyc
3 �Pf � @ 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 }tdd � |d j� D ��}tt|�|fdfV |dkr�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 d S )'N�type� Characters�SpaceCharacters�data� � �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 �/usr/lib/python3.6/genshi.py� <listcomp> s zto_genshi.<locals>.<listcomp>ZEndTag�CommentZDoctypeZpublicIdZsystemId)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 )Zwalker�text�tokenr r Zattrsr r r � to_genshi s<