You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bytes.rpartition bug in online documentation #80597
Activity
pewscorner commentedon Mar 24, 2019
The online Python 3 documentation for bytes.rpartition and bytearray.rpartition (https://docs.python.org/3/library/stdtypes.html#bytes.rpartition) incorrectly states:
"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."
This seems to have been copied without modification from bytes.partition where the statement is correct. The statement for rpartition should be:
"If the separator is not found, return a 3-tuple containing two empty bytes or bytearray objects, followed by a copy of the original sequence."
tirkarthi commentedon Mar 24, 2019
Thanks for the report. Would you like to create a PR for this?
The test for this behavior is at
cpython/Lib/test/test_bytes.py
Line 655 in 3d07c1e
Doc file to be changed : https://github.com/python/cpython/blob/master/Doc/library/stdtypes.rst
pewscorner commentedon Mar 24, 2019
OK, I can give it a try. I need to read up on the procedures for doing so, first, though, so it may take a while.
tirkarthi commentedon Mar 24, 2019
You can find more information about the process at https://devguide.python.org/
methane commentedon Apr 11, 2019
New changeset efc4870 by Inada Naoki (pewscorner) in branch 'master':
bpo-36416: Correct bytes.rpartition documentation (GH-12543)
efc4870
miss-islington commentedon Apr 11, 2019
New changeset 04b114e by Miss Islington (bot) in branch '3.7':
bpo-36416: Correct bytes.rpartition documentation (GH-12543)
04b114e