New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
str.expandtabs documentation is wrong #57574
Comments
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. |
While we're at it, wouldn't it be clearer to say "... where each tab character is replaced by..."? |
Other than that, the patch looks good. |
New changeset 84f803fdc0d2 by Eli Bendersky in branch '3.2': New changeset 25191fe10da9 by Eli Bendersky in branch 'default': |
Committed. Thanks for contributing. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: