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年06月19日 13:02 by mark, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg68403 - (view) | Author: Mark Summerfield (mark) * | Date: 2008年06月19日 13:02 | |
Python 30b1 >>> import locale >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") 'en_US.UTF-8' >>> for x in (1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900): print("[{0:>20n}]".format(x)) [ 1,234] [ 12,345] [ 123,456] [ 1,234,567] [ 12,345,678] [ 123,456,789] [ 1,234,567,890] [ 12,345,678,900] I expected that the commas would not increase the width, but maybe this was the intended behaviour? |
|||
| msg68408 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2008年06月19日 13:40 | |
I'd say that's a bug. I'll look at it. |
|||
| msg68676 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2008年06月24日 11:21 | |
Fixed in r64499 (trunk) and r64500 (py3k). I now get: >>> import locale >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") 'en_US.UTF-8' >>> for x in (123,1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900): ... print("[{0:>20n}]".format(x)) ... [ 123] [ 1,234] [ 12,345] [ 123,456] [ 1,234,567] [ 12,345,678] [ 123,456,789] [ 1,234,567,890] [ 12,345,678,900] and: >>> for x in (123,1234,12345,123456,1234567,12345678,123456789,1234567890,12345678900): ... print("[{0:>10n}]".format(x)) ... [ 123] [ 1,234] [ 12,345] [ 123,456] [ 1,234,567] [12,345,678] [123,456,789] [1,234,567,890] [12,345,678,900] |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:35 | admin | set | github: 47390 |
| 2008年06月24日 11:21:37 | eric.smith | set | status: open -> closed resolution: fixed messages: + msg68676 |
| 2008年06月19日 15:32:00 | eric.smith | set | versions: + Python 2.6 |
| 2008年06月19日 13:40:06 | eric.smith | set | nosy:
+ talin messages: + msg68408 components: + Interpreter Core |
| 2008年06月19日 13:15:12 | benjamin.peterson | set | assignee: eric.smith nosy: + eric.smith |
| 2008年06月19日 13:02:12 | mark | create | |