[Python-checkins] python/dist/src/Lib sre_parse.py,1.56,1.57
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sat, 19 Apr 2003 01:37:27 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv7931/Lib
Modified Files:
sre_parse.py
Log Message:
Patch #681152: Support escaped Unicode characters in classes. Fixes #612074.
Will backport to 2.2.
Index: sre_parse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** sre_parse.py 14 Apr 2003 17:59:32 -0000 1.56
--- sre_parse.py 19 Apr 2003 08:37:23 -0000 1.57
***************
*** 255,259 ****
raise error, "bogus escape: %s" % repr("\\" + escape)
return LITERAL, atoi(escape, 16) & 0xff
! elif str(escape[1:2]) in OCTDIGITS:
# octal escape (up to three digits)
while source.next in OCTDIGITS and len(escape) < 5:
--- 255,259 ----
raise error, "bogus escape: %s" % repr("\\" + escape)
return LITERAL, atoi(escape, 16) & 0xff
! elif escape[1:2] in OCTDIGITS:
# octal escape (up to three digits)
while source.next in OCTDIGITS and len(escape) < 5: