From a9860aeb08fce7494a963746c04102d23f1cf4ac Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 4 Oct 2011 19:06:00 +0300 Subject: #13054: fix usage of sys.maxunicode after PEP-393. --- Lib/sre_compile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Lib/sre_compile.py') 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] -- cgit v1.2.1