-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code is not matched docs (typeobject.c) #96418
Labels
type-bug
An unexpected behavior, bug, or error
Comments
What change are you proposing. It’s not clear to me what the problem is. |
Please provide a complete example that we can run. |
inline PyObject* makeType() {
PyType_Slot slots[] = {{0, nullptr}};
PyType_Spec spec{"static_property", PyProperty_Type.tp_basicsize, PyProperty_Type.tp_itemsize,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE, slots};
PyObject* type = PyType_FromSpec(&spec);
return type;
}
|
From docs, the name should have not '.', but in this example, it throws a DepracationWarning. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
typeobject.c
https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_name
Dynamic types are still checkpointed and the document does not match the code
The text was updated successfully, but these errors were encountered: