Skip to content

Commit 7dd698f

Browse files
committed
C
1 parent b687905 commit 7dd698f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

peps/pep-0661.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ C API
277277
Sentinels can also be useful in C extensions. We propose two new
278278
C API functions:
279279

280-
* ``PyObject *PySentinel_New(const char *name, const char *module_name)`` creates a new sentinel object.
280+
* ``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.
281283
* ``bool PySentinel_Check(PyObject *obj)`` checks if an object is a sentinel.
282284

283285
C code can use the ``==`` operator to check if an object is a

0 commit comments

Comments
 (0)