summaryrefslogtreecommitdiffstats
path: root/Lib/string.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/string.py')
-rw-r--r--Lib/string.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/string.py b/Lib/string.py
index ea0d359..8667c0e 100644
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -49,6 +49,9 @@ def maketrans(frm: bytes, to: bytes) -> bytes:
mapped to the byte at the same position in to.
The strings frm and to must be of the same length.
"""
+ import warnings
+ warnings.warn("string.maketrans is deprecated, use bytes.maketrans instead",
+ DeprecationWarning)
if len(frm) != len(to):
raise ValueError("maketrans arguments must have same length")
if not (isinstance(frm, bytes) and isinstance(to, bytes)):