New submission from Mark Theisen <mark.thei...@digitecinc.com>:

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'

----------
components: Interpreter Core
messages: 159955
nosy: theisenm
priority: normal
severity: normal
status: open
title: Misleading error message for str.format()
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14723>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to