Objetos sentinel¶
-
PyTypeObject PySentinel_Type¶
Esta instância do
PyTypeObjectrepresenta o tiposentineldo Python. Este é o mesmo objeto quesentinel.Adicionado na versão 3.15.
-
int PySentinel_Check(PyObject *o)¶
Return true if o is a
sentinelobject. Thesentineltype does not allow subclasses, so this check is exact.Adicionado na versão 3.15.
-
PyObject *PySentinel_New(const char *name, const char *module_name)¶
- Retorna valor: Nova referência.
Return a new
sentinelobject with__name__set to name and__module__set to module_name. name must not beNULL. If module_name isNULL,__module__is set toNone. ReturnNULLwith an exception set on failure.For pickling to work, module_name must be the name of an importable module, and the sentinel must be accessible from that module under a path matching name. Pickle treats name as a global variable name in module_name (see
object.__reduce__()).Adicionado na versão 3.15.