mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Add deprecation warning to 'pre' module
This commit is contained in:
parent
2854c478be
commit
7301907358
1 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,12 @@ This module also defines an exception 'error'.
|
||||||
import sys
|
import sys
|
||||||
from pcre import *
|
from pcre import *
|
||||||
|
|
||||||
|
# XXX This module is deprecated as of Python 2.3, and should be removed
|
||||||
|
# in the version that follows 2.3.
|
||||||
|
import warnings as _warnings
|
||||||
|
_warnings.warn("Please use the 're' module, not the 'pre' module",
|
||||||
|
DeprecationWarning)
|
||||||
|
|
||||||
__all__ = ["match","search","sub","subn","split","findall","escape","compile",
|
__all__ = ["match","search","sub","subn","split","findall","escape","compile",
|
||||||
"I","L","M","S","X","IGNORECASE","LOCALE","MULTILINE","DOTALL",
|
"I","L","M","S","X","IGNORECASE","LOCALE","MULTILINE","DOTALL",
|
||||||
"VERBOSE","error"]
|
"VERBOSE","error"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue