Serhiy Storchaka added the comment:

>From msg214162:

> This is basically the definition of object.__format__:
>
> def __format__(self, specifier):
>   if len(specifier) == 0:
>     return str(self)
>   raise TypeError('non-empty format string passed to object.__format__')

This simple algorithm is implemented in object-__format__.patch.

But current implementation uses ``format(str(self), '')`` instead of just 
``str(self)``. object-__format__-2.patch keeps this.

----------

_______________________________________
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