diff options
Diffstat (limited to 'Lib/sre_compile.py')
| -rw-r--r-- | Lib/sre_compile.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 90e3a25..ed84444 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -65,13 +65,6 @@ def _compile(code, pattern, flags): elif op in REPEATING_CODES: if flags & SRE_FLAG_TEMPLATE: raise error("internal: unsupported template operator") - emit(OPCODES[REPEAT]) - skip = _len(code); emit(0) - emit(av[0]) - emit(av[1]) - _compile(code, av[2], flags) - emit(OPCODES[SUCCESS]) - code[skip] = _len(code) - skip elif _simple(av) and op is not REPEAT: if op is MAX_REPEAT: emit(OPCODES[REPEAT_ONE]) @@ -302,7 +295,7 @@ def _mk_bitmap(bits): def _optimize_unicode(charset, fixup): try: import array - except ImportError: + except ModuleNotFoundError: return charset charmap = [0]*65536 negate = 0 |
