Sentinel Objects¶
-
PyTypeObject PySentinel_Type¶
This instance of
PyTypeObjectrepresents the Pythonsentineltype. This is the same object assentinel.Added in version 3.15.0a8 (unreleased).
-
int PySentinel_Check(PyObject *o)¶
Return true if o is a
sentinelobject. Thesentineltype does not allow subclasses, so this check is exact.Added in version 3.15.0a8 (unreleased).
-
PyObject *PySentinel_New(const char *name, const char *module_name)¶
- Return value: New reference.
Return a new
sentinelobject with__name__set to name and__module__set to module_name. ReturnNULLwith an exception set on failure.module_name should be the name of an importable module if the sentinel should support pickling.
Added in version 3.15.0a8 (unreleased).