mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Will backport to 2.2.
This commit is contained in:
parent
910ae6283a
commit
53d93adc46
2 changed files with 5 additions and 1 deletions
|
@ -254,7 +254,7 @@ def _class_escape(source, escape):
|
|||
if len(escape) != 2:
|
||||
raise error, "bogus escape: %s" % repr("\\" + escape)
|
||||
return LITERAL, atoi(escape, 16) & 0xff
|
||||
elif str(escape[1:2]) in OCTDIGITS:
|
||||
elif escape[1:2] in OCTDIGITS:
|
||||
# octal escape (up to three digits)
|
||||
while source.next in OCTDIGITS and len(escape) < 5:
|
||||
escape = escape + source.get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue