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

rather than `format(str(self), '')`.
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 @@
       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)
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 57fd4e4..3a001d7 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -89,6 +89,10 @@
   a name are now supported.
   (Contributed by Serhiy Storchaka in :issue:`30024`.)
 
+* ``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than
+  ``format(str(self), '')``.
+  (Contributed by Serhiy Storchaka in :issue:`28974`.)
+
 
 New Modules
 ===========
diff --git a/Misc/NEWS b/Misc/NEWS
index 4e17a66..73cd82c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 Core and Builtins
 -----------------
 
+- bpo-28974: ``object.__format__(x, '')`` is now equivalent to ``str(x)``
+  rather than ``format(str(self), '')``.
+
 - bpo-30024: Circular imports involving absolute imports with binding
   a submodule to a name are now supported.
 
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 9eb725f..121d66d 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4493,9 +4493,6 @@
 object___format___impl(PyObject *self, PyObject *format_spec)
 /*[clinic end generated code: output=34897efb543a974b input=7c3b3bc53a6fb7fa]*/
 {
-    PyObject *self_as_str = NULL;
-    PyObject *result = NULL;
-
     /* Issue 7994: If we're converting to a string, we
        should reject format specifications */
     if (PyUnicode_GET_LENGTH(format_spec) > 0) {
@@ -4504,12 +4501,7 @@
                      self->ob_type->tp_name);
         return NULL;
     }
-    self_as_str = PyObject_Str(self);
-    if (self_as_str != NULL) {
-        result = PyObject_Format(self_as_str, format_spec);
-        Py_DECREF(self_as_str);
-    }
-    return result;
+    return PyObject_Str(self);
 }
 
 /*[clinic input]