Serhiy Storchaka <[email protected]> added the comment:
Initially, the default __format__ converted the object to str and passed format
specifier to str.__format__. This is defined in PEP 3101:
class object:
def __format__(self, format_spec):
return format(str(self), format_spec)
But later we changed the implementation, because this leaded to difficult to
catch errors. Non-empty format specifier is now error in the default __format__.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com