Skip to content

Commit 61754a3

Browse files
Add signatures for str.maketrans().
1 parent 402efa9 commit 61754a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/stdtypes.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,8 @@ expression support in the :mod:`re` module).
21572157
'three!'
21582158

21592159

2160-
.. staticmethod:: str.maketrans(x[, y[, z]])
2160+
.. staticmethod:: str.maketrans(dict, /)
2161+
str.maketrans(from, to, remove='', /)
21612162

21622163
This static method returns a translation table usable for :meth:`str.translate`.
21632164

@@ -2167,8 +2168,8 @@ expression support in the :mod:`re` module).
21672168
converted to ordinals.
21682169

21692170
If there are two arguments, they must be strings of equal length, and in the
2170-
resulting dictionary, each character in x will be mapped to the character at
2171-
the same position in y. If there is a third argument, it must be a string,
2171+
resulting dictionary, each character in *from* will be mapped to the character at
2172+
the same position in *to*. If there is a third argument, it must be a string,
21722173
whose characters will be mapped to ``None`` in the result.
21732174

21742175

0 commit comments

Comments
 (0)