summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-10-29 10:24:45 (GMT)
committerGitHub <noreply@github.com>2017-10-29 10:24:45 (GMT)
commit9ea5a3a45b35d01b602e7e4da4f72b2db407e5c6 (patch)
tree11ee75c2a6cb1780e7aac0137058379498ca376e /Doc/library
parent0f1973d06e2116deafb19bbb9443b138187803c7 (diff)
downloadcpython-9ea5a3a45b35d01b602e7e4da4f72b2db407e5c6.zip
cpython-9ea5a3a45b35d01b602e7e4da4f72b2db407e5c6.tar.gz
cpython-9ea5a3a45b35d01b602e7e4da4f72b2db407e5c6.tar.bz2
[3.6] bpo-20047: Make bytearray methods partition() and rpartition() rejecting (GH-4158) (#4162)
separators that are not bytes-like objects.. (cherry picked from commit a2314283ff87c65e1745a42c2f2b716b1a209128)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index b8c4d59..75e97b9 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2564,8 +2564,9 @@ arbitrary binary data.
bytearray.partition(sep)
Split the sequence at the first occurrence of *sep*, and return a 3-tuple
- containing the part before the separator, the separator, and the part
- after the separator. If the separator is not found, return a 3-tuple
+ containing the part before the separator, the separator itself or its
+ bytearray copy, and the part after the separator.
+ If the separator is not found, return a 3-tuple
containing a copy of the original sequence, followed by two empty bytes or
bytearray objects.
@@ -2620,8 +2621,9 @@ arbitrary binary data.
bytearray.rpartition(sep)
Split the sequence at the last occurrence of *sep*, and return a 3-tuple
- containing the part before the separator, the separator, and the part
- after the separator. If the separator is not found, return a 3-tuple
+ containing the part before the separator, the separator itself or its
+ bytearray copy, and the part after the separator.
+ If the separator is not found, return a 3-tuple
containing a copy of the original sequence, followed by two empty bytes or
bytearray objects.