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.
1 parent b687905 commit 7dd698fCopy full SHA for 7dd698f
1 file changed
peps/pep-0661.rst
@@ -277,7 +277,9 @@ C API
277
Sentinels can also be useful in C extensions. We propose two new
278
C API functions:
279
280
-* ``PyObject *PySentinel_New(const char *name, const char *module_name)`` creates a new sentinel object.
+* ``PyObject *PySentinel_New(const char *name, const char *module_name, const char *repr)``
281
+ creates a new sentinel object. ``repr`` may be ``NULL``, in which case the sentinel's
282
+ repr will be the same as its name.
283
* ``bool PySentinel_Check(PyObject *obj)`` checks if an object is a sentinel.
284
285
C code can use the ``==`` operator to check if an object is a
0 commit comments