diff options
author | Georg Brandl <georg@python.org> | 2009-04-12 15:51:51 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-04-12 15:51:51 (GMT) |
commit | abc387747dc573e05a4b31387797a0272062b2ef (patch) | |
tree | c12c0a0e45cb06edb87798a7831b1c8f79033015 /Doc/library/string.rst | |
parent | 78532baeabc4234e3894c775f2bb7e0a21c12e0e (diff) | |
download | cpython-abc387747dc573e05a4b31387797a0272062b2ef.zip cpython-abc387747dc573e05a4b31387797a0272062b2ef.tar.gz cpython-abc387747dc573e05a4b31387797a0272062b2ef.tar.bz2 |
Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
string.maketrans() which actually works on bytes. (Also closes #5675.)
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r-- | Doc/library/string.rst | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 5867a5a..29bf160 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -548,13 +548,9 @@ rule: delimiter), and it should appear last in the regular expression. -String functions +Helper functions ---------------- -The following functions are available to operate on string objects. -They are not available as string methods. - - .. function:: capwords(s) Split the argument into words using :func:`split`, capitalize each word using @@ -568,3 +564,6 @@ They are not available as string methods. Return a translation table suitable for passing to :meth:`bytes.translate`, that will map each character in *from* into the character at the same position in *to*; *from* and *to* must have the same length. + + .. deprecated:: 3.1 + Use the :meth:`bytes.maketrans` static method instead. |