summaryrefslogtreecommitdiff
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorEzio Melotti <devnull@localhost>2011-10-04 19:06:00 +0300
committerEzio Melotti <devnull@localhost>2011-10-04 19:06:00 +0300
commit8e1ebfa3d3fb1d4bce745b83770aaa4ec90b9bad (patch)
treefcce25aec095f7699182d6b18071481621000c8b /Lib/sre_compile.py
parenta50cdfc0a18fe6ef69b6fbc5b6394fd2ccad4bd4 (diff)
downloadcpython-8e1ebfa3d3fb1d4bce745b83770aaa4ec90b9bad.tar.gz
#13054: fix usage of sys.maxunicode after PEP-393.
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index f52ea01459..75f3a093fe 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -318,11 +318,13 @@ def _optimize_unicode(charset, fixup):
# XXX: could expand category
return charset # cannot compress
except IndexError:
- # non-BMP characters
+ # non-BMP characters; XXX now they should work
return charset
if negate:
if sys.maxunicode != 65535:
# XXX: negation does not work with big charsets
+ # XXX2: now they should work, but removing this will make the
+ # charmap 17 times bigger
return charset
for i in range(65536):
charmap[i] = not charmap[i]