summaryrefslogtreecommitdiffstats
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorEzio Melotti <none@none>2011-10-04 16:06:00 (GMT)
committerEzio Melotti <none@none>2011-10-04 16:06:00 (GMT)
commita9860aeb08fce7494a963746c04102d23f1cf4ac (patch)
treebe8e64b6a66b80997969362be5795b75ac7b313a /Lib/sre_compile.py
parentb7591d4780c76e17db4e143a097d128b124c2e66 (diff)
downloadcpython-a9860aeb08fce7494a963746c04102d23f1cf4ac.zip
cpython-a9860aeb08fce7494a963746c04102d23f1cf4ac.tar.gz
cpython-a9860aeb08fce7494a963746c04102d23f1cf4ac.tar.bz2
#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 f52ea01..75f3a09 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]