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 2012年05月04日 18:21 by theisenm, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg159955 - (view) | Author: Mark Theisen (theisenm) | Date: 2012年05月04日 18:21 | |
When I run this code: '{0:i}'.format(None)
I get this error:
ValueError: Unknown format code 'i' for object of type 'str'
This seems misleading because None is of Type 'NoneType'. I was expecting the error to say something to the effect of:
Unknown format code 'i' for object of type 'NoneType'
|
|||
| msg159957 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2012年05月04日 18:25 | |
This is a duplicate of issue 13790. See the comments there for why it works this way. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | github: 58928 |
| 2012年05月04日 18:25:14 | eric.smith | set | status: open -> closed nosy: + eric.smith messages: + msg159957 superseder: In str.format an incorrect error message for list, tuple, dict, set resolution: duplicate |
| 2012年05月04日 18:21:12 | theisenm | create | |