Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/lib2to3/pgen2/
Upload File :
Current File : //usr/lib/python2.7/lib2to3/pgen2/literals.pyc


|_c@sdZddlZi
dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6ZdZdZdZedkrendS(s<Safely evaluate Python string literals without using eval().iNstastbstfs
tns
trs	ttstvt't"s\cCs|jdd\}}|jds-ttj|}|dk	rL|S|jdr|d}t|dkrtd|nyt|d}Wqtk
rtd|qXn7yt|d}Wn!tk
rtd	|nXt	|S(
Niis\txis!invalid hex string escape ('\%s')iis#invalid octal string escape ('\%s')(
tgroupt
startswithtAssertionErrortsimple_escapestgettNonetlent
ValueErrortinttchr(tmtallttailtescthexesti((s,/usr/lib/python2.7/lib2to3/pgen2/literals.pytescapes$


cCs|jds4|jds4tt|d |d}|d |dkr_|d}n|j|stt|t|t|dt|kst|t|t|!}tjdt|S(NRRiiiis)\\(\'|\"|\\|[abfnrtv]|x.{0,2}|[0-7]{1,3})(RRtreprtendswithRtretsubR(tstq((s,/usr/lib/python2.7/lib2to3/pgen2/literals.pyt
evalString(s4

,"cCs_xXtdD]J}t|}t|}t|}||kr
|G|G|G|GHq
q
WdS(Ni(trangeRRR!(RtcRte((s,/usr/lib/python2.7/lib2to3/pgen2/literals.pyttest2st__main__(t__doc__RR
RR!R%t__name__(((s,/usr/lib/python2.7/lib2to3/pgen2/literals.pyt<module>s