bpo-20047: Make bytearray methods partition() and rpartition() rejecting (#4158)

separators that are not bytes-like objects.
This commit is contained in:
Serhiy Storchaka 2017-10-29 02:11:54 +03:00 committed by GitHub
parent 5a4bbcd479
commit a2314283ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 89 additions and 38 deletions

View file

@ -86,7 +86,7 @@ PyDoc_STRVAR(bytes_rpartition__doc__,
"\n"
"Partition the bytes into three parts using the given separator.\n"
"\n"
"This will search for the separator sep in the bytes, starting and the end. If\n"
"This will search for the separator sep in the bytes, starting at the end. If\n"
"the separator is found, returns a 3-tuple containing the part before the\n"
"separator, the separator itself, and the part after it.\n"
"\n"
@ -499,4 +499,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=9e3374bd7d04c163 input=a9049054013a1b77]*/
/*[clinic end generated code: output=fc9e02359cc56d36 input=a9049054013a1b77]*/