We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyObject_Format
1 parent 21b9402 commit eaafea8Copy full SHA for eaafea8
Doc/c-api/object.rst
@@ -161,6 +161,15 @@ Object Protocol
161
If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool`
162
will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`.
163
164
+.. c:function:: PyObject* PyObject_Format(PyObject *obj, PyObject *format_spec)
165
+
166
+ Format *obj* using *format_spec*. This is equivalent to the Python
167
+ expression ``format(obj, format_spec)``.
168
169
+ *format_spec* may be ``NULL``. In this case the call is equivalent
170
+ to ``format(obj)``.
171
+ Returns the formatted string on success, ``NULL`` on failure.
172
173
.. c:function:: PyObject* PyObject_Repr(PyObject *o)
174
175
.. index:: builtin: repr
0 commit comments