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 2008年07月18日 20:09 by hagen, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg69988 - (view) | Author: Hagen Fürstenau (hagen) | Date: 2008年07月18日 20:09 | |
This happens with an empty type field in the format specification:
>>> "{0:1}".format(-1.23)
'.0-1.23'
With type "g" it's ok:
>>> "{0:1g}".format(-1.23)
'-1.23'
|
|||
| msg69998 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2008年07月19日 00:34 | |
Thanks for catching this. I was not skipping the leading sign char when looking for the decimal point in the string, which was causing me to incorrectly determine that a decimal wasn't present. Fixed in r65125 (trunk) and r65126 (py3k). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:36 | admin | set | github: 47661 |
| 2008年07月19日 00:34:32 | eric.smith | set | status: open -> closed resolution: fixed messages: + msg69998 components: + Interpreter Core, - Library (Lib) |
| 2008年07月18日 20:53:39 | benjamin.peterson | set | assignee: eric.smith nosy: + eric.smith |
| 2008年07月18日 20:09:20 | hagen | create | |