summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-05-13 09:40:52 (GMT)
committerGitHub <noreply@github.com>2017-05-13 09:40:52 (GMT)
commit7e19dbc92ec06a987eaae72f7cdfd32006aa4960 (patch)
tree29a0b2c806b128c9c111b09b0c01ba3107e88bce /Doc/reference
parenta66f9c6bb134561a24374f10e8c35417d356ce14 (diff)
downloadcpython-7e19dbc92ec06a987eaae72f7cdfd32006aa4960.zip
cpython-7e19dbc92ec06a987eaae72f7cdfd32006aa4960.tar.gz
cpython-7e19dbc92ec06a987eaae72f7cdfd32006aa4960.tar.bz2
bpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` (#506)
rather than `format(str(self), '')`.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 25afc35..36bd71a 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -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)