Eric V. Smith <e...@trueblade.com> added the comment:

I agree this is the desired behavior, and not a bug.

Because you are not specifying a __format__ in your class, object.__format__ is 
being called. By design, it does not understand any formatting specifiers, 
instead reserving them for your class to implement. "!s" is the correct way to 
convert your type to a string. Either that, or add a __format__ that 
understands "s".

Note that not all types understand "s", for example, datetime.

----------
assignee:  -> eric.smith
nosy: +eric.smith
stage:  -> resolved
status: pending -> closed

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

Reply via email to