mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Remove support for importing 'pre' module
This commit is contained in:
parent
409a4c08b5
commit
7fd1c8c880
1 changed files with 2 additions and 14 deletions
16
Lib/re.py
16
Lib/re.py
|
@ -1,8 +1,5 @@
|
||||||
"""Minimal "re" compatibility wrapper"""
|
"""Minimal "re" compatibility wrapper"""
|
||||||
|
|
||||||
# If your regexps don't work well under 2.0b1, you can switch
|
|
||||||
# to the old engine ("pre") down below.
|
|
||||||
#
|
|
||||||
# To help us fix any remaining bugs in the new engine, please
|
# To help us fix any remaining bugs in the new engine, please
|
||||||
# report what went wrong. You can either use the following web
|
# report what went wrong. You can either use the following web
|
||||||
# page:
|
# page:
|
||||||
|
@ -19,15 +16,6 @@
|
||||||
# thanks /F
|
# thanks /F
|
||||||
#
|
#
|
||||||
|
|
||||||
engine = "sre"
|
from sre import *
|
||||||
# engine = "pre"
|
from sre import __all__
|
||||||
|
|
||||||
if engine == "sre":
|
|
||||||
# New unicode-aware engine
|
|
||||||
from sre import *
|
|
||||||
from sre import __all__
|
|
||||||
else:
|
|
||||||
# Old 1.5.2 engine. This one supports 8-bit strings only,
|
|
||||||
# and will be removed in 2.0 final.
|
|
||||||
from pre import *
|
|
||||||
from pre import __all__
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue