bpo-28974: object.__format__(x, '') is now equivalent to str(x) (#506)

rather than `format(str(self), '')`.
This commit is contained in:
Serhiy Storchaka 2017-05-13 12:40:52 +03:00 committed by GitHub
parent a66f9c6bb1
commit 7e19dbc92e
4 changed files with 12 additions and 9 deletions

View file

@ -1282,6 +1282,10 @@ Basic customization
The __format__ method of ``object`` itself raises a :exc:`TypeError`
if passed any non-empty string.
.. versionchanged:: 3.7
``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather
than ``format(str(self), '')``.
.. _richcmpfuncs:
.. method:: object.__lt__(self, other)