classification
Title: Errors in docstrings of find and rfind methods of bytes and bytestring
Type: Stage: resolved
Components: Documentation, Interpreter Core Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, orsenthil, petri.lehtinen, python-dev
Priority: normal Keywords: easy

Created on 2011-07-23 18:22 by petri.lehtinen, last changed 2011-07-27 15:37 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
3.3.txt petri.lehtinen, 2011-07-24 10:53 Output for 3.3
3.2.txt petri.lehtinen, 2011-07-24 10:57 Output for 3.2
2.7.txt petri.lehtinen, 2011-07-24 10:59 Output for 2.7
Messages (5)
msg141001 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-23 18:22
bytes.{find,rfind} reads s[start:end]; should be B[start:end]

bytearray.{find,rfind} reads s[start,end]; should be B[start:end]

{str,unicode}.{find,rfind} reads s{start:end]; should be S[start:end]
msg141027 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-07-24 00:14
These are not on head revision in cpython and 3.2. Where did you find this bug? Please provide further details along with snippet and/or file.
msg141041 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-07-24 10:53
Attached outputs of the following commands in the corresponding head revisions (from yesterday, as hg.python.org seems to be down today):

3.3:

for x in {bytes,bytearray}.{find,rfind} str.{find,rfind}; do echo === $x ===; ./python -c "help($x)" | cat; echo; done > 3.3.txt

3.2:

for x in {bytes,bytearray}.{find,rfind} str.{find,rfind}; do echo === $x ===; ./python -c "help($x)" | cat; echo; done > 3.2.txt

2.7:

for x in bytearray.{find,rfind} unicode.{find,rfind}; do echo === $x ===; ./python -c "help($x)" | cat; echo; done > 2.7.txt


In all files, I see s[start:end] or s[start,end] where there should read B[start:end] or S[start:end].
msg141042 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-07-24 11:03
Okay, got it. Thanks. I was a subtle one within the description. I
missed it in the first place.
msg141236 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-07-27 15:37
New changeset c3aebd01a033 by Senthil Kumaran in branch '3.2':
Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
http://hg.python.org/cpython/rev/c3aebd01a033

New changeset 842494d73f69 by Senthil Kumaran in branch 'default':
merge from 3.2 - Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
http://hg.python.org/cpython/rev/842494d73f69

New changeset e266415cf42c by Senthil Kumaran in branch '2.7':
merge from 3.2 - Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
http://hg.python.org/cpython/rev/e266415cf42c
History
Date User Action Args
2011-07-27 15:37:28python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg141236

resolution: fixed
stage: needs patch -> resolved
2011-07-24 11:03:12orsenthilsetmessages: + msg141042
2011-07-24 10:59:48petri.lehtinensetfiles: + 2.7.txt
2011-07-24 10:57:43petri.lehtinensetfiles: + 3.2.txt
2011-07-24 10:53:50petri.lehtinensetfiles: + 3.3.txt

messages: + msg141041
stage: needs patch
2011-07-24 00:14:32orsenthilsetnosy: + orsenthil

messages: + msg141027
stage: needs patch -> (no value)
2011-07-23 18:22:39petri.lehtinencreate