This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年07月27日 14:29 by eli.bendersky, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue12644.diff | ezio.melotti, 2011年07月27日 14:42 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg141228 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2011年07月27日 14:29 | |
The 'a' conversion type isn't documented in library/stdtypes.rst |
|||
| msg141229 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年07月27日 14:45 | |
I don’t think anyone could find anything wrong with the patch. |
|||
| msg141243 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2011年07月27日 16:54 | |
%r has note (5) saying "The precision determines the maximal number of characters used." Does this apply to %a as well? Other than that, LGTM |
|||
| msg141245 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2011年07月27日 16:57 | |
ISTM that it applies to both %s and %a, but the note is wrong/imprecise. The precision determines where the string is truncated, but the actual number of characters is given by the field width. |
|||
| msg141246 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2011年07月27日 17:08 | |
Yeah, the note should probably be clarified to mention that if precision is specified, only the first precision characters will be shown. The field width is covered globally (for all conversion types) in note 4 above the table. While we're at it, note 5 is: Precision (optional), given as a '.' (dot) followed by the precision. If specified as '*' (an asterisk), the actual width is read from the next element of the tuple in values, and the value to convert comes after the precision. I think that the second sentence should have "the actual precision" instead "the actual width". |
|||
| msg141331 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年07月29日 06:35 | |
New changeset 9846f6463f23 by Eli Bendersky in branch '3.2': Issue #12644: document the '%a' conversion in the old string formatting operations. Patch prepared together with Ezio Melotti http://hg.python.org/cpython/rev/9846f6463f23 New changeset 80a3bf889cf6 by Eli Bendersky in branch 'default': Merge from 3.2: Issue #12644: document the '%a' conversion in the old string formatting operations. Patch prepared together with Ezio Melotti http://hg.python.org/cpython/rev/80a3bf889cf6 |
|||
| msg141332 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2011年07月29日 06:43 | |
Ezio, I've taken the liberty to adapt your patch with the suggested fixes and commit it to both 3.2 and 3.3 If everything is OK, this issue can be close (I'll do it in a few days if no one else does :-) |
|||
| msg141333 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2011年07月29日 06:47 | |
The commit looks fine, the issue can be closed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:20 | admin | set | github: 56853 |
| 2011年07月29日 06:49:34 | eli.bendersky | set | status: open -> closed resolution: fixed |
| 2011年07月29日 06:47:46 | ezio.melotti | set | messages: + msg141333 |
| 2011年07月29日 06:43:33 | eli.bendersky | set | messages: + msg141332 |
| 2011年07月29日 06:35:48 | python-dev | set | nosy:
+ python-dev messages: + msg141331 |
| 2011年07月27日 17:08:31 | eli.bendersky | set | messages: + msg141246 |
| 2011年07月27日 16:57:00 | ezio.melotti | set | nosy:
+ ezio.melotti messages: + msg141245 |
| 2011年07月27日 16:54:56 | eli.bendersky | set | messages: + msg141243 |
| 2011年07月27日 14:45:45 | eric.araujo | set | messages:
+ msg141229 stage: patch review -> commit review |
| 2011年07月27日 14:44:34 | eric.araujo | set | nosy:
+ eric.araujo, docs@python |
| 2011年07月27日 14:42:26 | ezio.melotti | set | keywords:
+ patch, easy, - gsoc files: + issue12644.diff stage: patch review |
| 2011年07月27日 14:29:13 | eli.bendersky | create | |