Issue 13754: str.ljust and str.rjust do not exactly describes original string return (original) (raw)

Issue13754

Created on 2012-01-10 03:59 by py.user, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg151000 - (view) Author: py.user (py.user) * Date: 2012-01-10 03:59
http://docs.python.org/py3k/library/stdtypes.html#str.ljust str.ljust(width[, fillchar])¶ Return the string left justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s). str.rjust(width[, fillchar])¶ Return the string right justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s). "less than len(s)" -> "less than or equal to len(s)"
msg151001 - (view) Author: py.user (py.user) * Date: 2012-01-10 04:04
str.zfill also
msg151037 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-01-11 08:00
The short doc strings do not mention the issue either way. I think it ok to leave them as they are. While the claim is how the functions *should* operate, I verified that it is how they *do* operate in all three branches.
msg151042 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-01-11 08:33
New changeset 3aed8787ce5c by Terry Jan Reedy in branch '2.7': Closes #13754 String returned if less than *or equal to* x 3 http://hg.python.org/cpython/rev/3aed8787ce5c New changeset 3f2e5fd17b76 by Terry Jan Reedy in branch '3.2': #13754 String returned if less than *or equal to* x 3 http://hg.python.org/cpython/rev/3f2e5fd17b76 New changeset 0df85a2ebe4d by Terry Jan Reedy in branch 'default': Merge with 3.2 http://hg.python.org/cpython/rev/0df85a2ebe4d
History
Date User Action Args
2022-04-11 14:57:25 admin set github: 57963
2012-01-11 08:33:43 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: needs patch -> resolved
2012-01-11 08:00:28 terry.reedy set assignee: docs@python -> terry.reedyversions: + Python 2.7, Python 3.3keywords: + patch, easynosy: + terry.reedymessages: + stage: needs patch
2012-01-10 04:04:53 py.user set messages: +
2012-01-10 03:59:55 py.user create