[docs] [issue13365] str.expandtabs documentation is wrong

John Feuerstein report at bugs.python.org
Mon Nov 7 15:23:05 CET 2011


New submission from John Feuerstein <john at feurix.com>:

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.

----------
assignee: docs at python
components: Documentation
files: expandtabs_doc.diff
keywords: patch
messages: 147222
nosy: docs at python, john.feuerstein
priority: normal
severity: normal
status: open
title: str.expandtabs documentation is wrong
versions: Python 3.3
Added file: http://bugs.python.org/file23625/expandtabs_doc.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13365>
_______________________________________


More information about the docs mailing list