Commit 7292e921 authored by Guido van Rossum's avatar Guido van Rossum

Adding a warning about the regsub module. This also disables further

warnings in this same module, to prevent getting a warning about
importing regex (we *know* that it's obsolete :-).
parent b1d13617
......@@ -10,6 +10,13 @@ splitx(str, pat, maxsplit): split string using pattern as delimiter plus
return delimiters
"""
import warnings
warnings.warn("the regsub module is deprecated; please use re.sub()",
DeprecationWarning)
# Ignore further deprecation warnings about this module
warnings.filterwarnings("ignore", "", DeprecationWarning, __name__)
import regex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment