관리-도구
편집 파일: fix_unicode.cpython-35.pyc
��Yf� � @ sU d Z d d l m Z d d l m Z d d d d i Z Gd d � d e j � Z d S)z�Fixer for unicode. * Changes unicode to str and unichr to chr. * If "...\u..." is not unicode literal change it into "...\\u...". * Change u"..." into "...". � )�token)� fixer_baseZunichr�chrZunicode�strc s: e Z d Z d Z d Z � f d d � Z d d � Z � S)� FixUnicodeTzSTRING | 'unicode' | 'unichr'c s/ t t | � j | | � d | j k | _ d S)N�unicode_literals)�superr � start_treeZfuture_featuresr )�selfZtree�filename)� __class__� �>/opt/alt/python35/lib64/python3.5/lib2to3/fixes/fix_unicode.pyr s zFixUnicode.start_treec C s� | j t j k r2 | j � } t | j | _ | S| j t j k r� | j } | j r� | d d k r� d | k r� d j d d � | j d � D� � } | d d k r� | d d � } | | j k r� | S| j � } | | _ | Sd S) N� z'"�\z\\c S s. g | ]$ } | j d d � j d d � � q S)z\uz\\uz\Uz\\U)�replace)�.0�vr r r � <listcomp>! s z(FixUnicode.transform.<locals>.<listcomp>ZuU� ) �typer �NAMEZclone�_mapping�value�STRINGr �join�split)r ZnodeZresults�new�valr r r � transform s"