Eric V. Smith added the comment:

I left a comment on Rietveld, but repeating it here because for me those 
messages often go to spam:

I think you want to make this more general, by modifying the message for the 
TypeError that follows. Any type that doesn't provide it's own __format__ 
should produce an error when using a non-empty format string.

For example:

>>> format({}, 'a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__

Would be better as:
TypeError: non-empty format string passed to __format__ for object of type 
"class <'dict'>"

(Or some prettier way to print out the type).

----------

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

Reply via email to