Tin mới
Similar to Py_GetConstant(), but return a borrowed reference.
Flag to be used with multiple functions that print the object (like PyObject_Print() and PyFile_WriteObject()). If passed, these functions use the str() of the object instead of the repr().
Exceptions that occur when this calls __getattr__() and __getattribute__() methods aren’t propagated, but instead given to sys.unraisablehook(). For proper error handling, use PyObject_HasAttrWithError(), PyObject_GetOpt
Exceptions that occur when this calls __getattr__() and __getattribute__() methods aren’t propagated, but instead given to sys.unraisablehook(). For proper error handling, use PyObject_HasAttrWithError(), PyObject_GetOpt
This is the same as PyObject_SetAttr(), but attr_name is specified as a const char* UTF-8 encoded bytes string, rather than a PyObject*.
Get a pointer to subclass-specific data reserved for cls.
Enable deferred reference counting on obj, if supported by the runtime. In the free-threaded build, this allows the interpreter to avoid reference count adjustments to obj, which may improve multi-threaded performance. T
Increments the reference count of obj if it is not zero. Returns 1 if the object’s reference count was successfully incremented. Otherwise, this function returns 0.
Increments the reference count of obj if it is not zero. Returns 1 if the object’s reference count was successfully incremented. Otherwise, this function returns 0.