@@ -14,17 +14,29 @@ Sentinel objects
1414
1515.. c :function :: int PySentinel_Check (PyObject *o)
1616
17- Return true if *o * is a :class: `sentinel ` object. The :class: `sentinel ` type
18- does not allow subclasses, so this check is exact.
17+ Return true if *o * is a :class: `sentinel ` object or a subtype.
18+ The :class: `sentinel ` type does not currently allow subclasses,
19+ so this check is exact.
20+ Future Python versions may choose to allow subtyping.
21+ This function always succeeds.
1922
2023 .. versionadded :: 3.15
2124
22- .. c :function :: PyObject* PySentinel_New (const char *name, const char *module_name)
25+ .. c :function :: int PySentinel_CheckExact (PyObject *o)
26+
27+ Return true if *o * is a :class: `sentinel ` object, but not a subtype.
28+ The :class: `sentinel ` type does not currently allow subclasses.
29+ Future Python versions may choose to allow subtyping.
30+ This function always succeeds.
31+
32+ .. versionadded :: 3.15
33+
34+ .. c :function :: PyObject* PySentinel_New (const char *name, const char *module_name, const char *repr)
2335
2436 Return a new :class: `sentinel ` object with :attr: `~sentinel.__name__ ` set to
2537 *name * and :attr: `~sentinel.__module__ ` set to *module_name *.
2638 *name * must not be ``NULL ``. If *module_name * is ``NULL ``, :attr: `~sentinel.__module__ `
27- is set to ``None ``.
39+ is set to ``None ``. If * repr * is `` NULL ``, `` repr() `` returns :attr: ` ~sentinel.__name__ `.
2840 Return ``NULL `` with an exception set on failure.
2941
3042 For pickling to work, *module_name * must be the name of an importable
0 commit comments