diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-04-19 08:37:24 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-04-19 08:37:24 (GMT) |
commit | 53d93adc46c73e6fdcd6db2d16f0136eadba9839 (patch) | |
tree | 748ba575bd069a881b92cdc60ed9d888e7cd3755 /Lib/sre_parse.py | |
parent | 910ae6283a2e715bd13962bd8e4da71c4fd3627d (diff) | |
download | cpython-53d93adc46c73e6fdcd6db2d16f0136eadba9839.zip cpython-53d93adc46c73e6fdcd6db2d16f0136eadba9839.tar.gz cpython-53d93adc46c73e6fdcd6db2d16f0136eadba9839.tar.bz2 |
Patch #681152: Support escaped Unicode characters in classes. Fixes #612074.
Will backport to 2.2.
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r-- | Lib/sre_parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index fdf6767..b85aea7 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -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() |