Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyo

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


�`^c@sWdZddlmZddlmZidd6dd6Zdejfd	��YZd
S(s�Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

i(ttoken(t
fixer_baseuchruunichrustruunicodet
FixUnicodecBs&eZeZdZd�Zd�ZRS(sSTRING | 'unicode' | 'unichr'cCs/tt|�j||�d|jk|_dS(Ntunicode_literals(tsuperRt
start_treetfuture_featuresR(tselfttreetfilename((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyRscCs|jtjkr2|j�}t|j|_|S|jtjkr|j}|jr�|ddkr�d|kr�djg|j	d�D]$}|j
dd�j
dd�^q��}n|dd	kr�|d
}n||jkr�S|j�}||_|SdS(Niu'"u\u\\u\uu\\uu\Uu\\UuuUi(ttypeRtNAMEtclonet_mappingtvaluetSTRINGRtjointsplittreplace(Rtnodetresultstnewtvaltv((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyt	transforms"	&=
	(t__name__t
__module__tTruet
BM_compatibletPATTERNRR(((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyRs	N(t__doc__tpgen2RtRR
tBaseFixR(((s//sys/lib/python2.7/lib2to3/fixes/fix_unicode.pyt<module>	s

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.