summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-08-27 08:35:02 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-08-27 08:35:02 (GMT)
commit1b6c6da85d7fd268825e09cc8ff339540c1f77bc (patch)
treec714a20ce1553644c721170044e55a43ee8a676b /Doc
parent8c3c52b19f6ded5593cfab1086051cb5f4628434 (diff)
downloadcpython-1b6c6da85d7fd268825e09cc8ff339540c1f77bc.zip
cpython-1b6c6da85d7fd268825e09cc8ff339540c1f77bc.tar.gz
cpython-1b6c6da85d7fd268825e09cc8ff339540c1f77bc.tar.bz2
Issue #27506: Support bytes/bytearray.translate() delete as keyword argument
Patch by Xiang Zhang.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 76ecd01..0c7249d 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2631,8 +2631,8 @@ arbitrary binary data.
The prefix(es) to search for may be any :term:`bytes-like object`.
-.. method:: bytes.translate(table[, delete])
- bytearray.translate(table[, delete])
+.. method:: bytes.translate(table, delete=b'')
+ bytearray.translate(table, delete=b'')
Return a copy of the bytes or bytearray object where all bytes occurring in
the optional argument *delete* are removed, and the remaining bytes have
@@ -2648,6 +2648,9 @@ arbitrary binary data.
>>> b'read this short text'.translate(None, b'aeiou')
b'rd ths shrt txt'
+ .. versionchanged:: 3.6
+ *delete* is now supported as a keyword argument.
+
The following methods on bytes and bytearray objects have default behaviours
that assume the use of ASCII compatible binary formats, but can still be used