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

Correct: this change was made specifically so that objects could add their own 
format specifiers at a later time. If I recall correctly, This change was 
precipitated by wanting to add datetime.__format__: this change broke existing 
uses for format() that formatted datetimes as strings.

But the result is that objects that really just want to be formatted as strings 
need to have their own __format__ which returns format(str(self), format_spec).

----------

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

Reply via email to