Issue 13365: str.expandtabs documentation is wrong (original) (raw)

Created on 2011-11-07 14:23 by john.feuerstein, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
expandtabs_doc.diff john.feuerstein,2011-11-07 14:23 review
Messages (5)
msg147222 - (view) Author: John Feuerstein (john.feuerstein) * Date: 2011-11-07 14:23
The documentation for str.expandtabs([tabsize]) is wrong: "Return a copy of the string where all tab characters are replaced by one or more spaces, depending on the current column and the given tab size. [...]" This should read "zero or more spaces": >>> 'a\tb'.expandtabs(0) 'ab' >>> 'a\tb'.expandtabs(-1) 'ab' The description in Objects/unicodeobject.c does not include this error.
msg147224 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-07 14:47
While we're at it, wouldn't it be clearer to say "... where each tab character is replaced by..."?
msg147225 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-07 14:50
Other than that, the patch looks good.
msg147420 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-11-11 08:34
New changeset 84f803fdc0d2 by Eli Bendersky in branch '3.2': Issue #13365: correct an error in the documentation of str.expandtabs http://hg.python.org/cpython/rev/84f803fdc0d2 New changeset 25191fe10da9 by Eli Bendersky in branch 'default': Issue #13365: correct an error in the documentation of str.expandtabs. Patch by John Feuerstein http://hg.python.org/cpython/rev/25191fe10da9
msg147421 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-11 08:35
Committed. Thanks for contributing.
History
Date User Action Args
2022-04-11 14:57:23 admin set github: 57574
2011-11-11 08:35:19 eli.bendersky set status: open -> closedmessages: +
2011-11-11 08:34:53 python-dev set nosy: + python-devmessages: +
2011-11-07 14:50:07 eli.bendersky set messages: +
2011-11-07 14:47:08 eli.bendersky set nosy: + eli.benderskymessages: +
2011-11-07 14:23:05 john.feuerstein create