gh-112266: Remove (if defined) part from __dict__ and __weakref__ docstrings (#112268)

This commit is contained in:
Nikita Sobolev 2023-11-19 21:30:07 +03:00 committed by GitHub
parent 77d9f1e6d9
commit f8129146ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 18 deletions

View file

@ -3006,21 +3006,21 @@ subtype_getweakref(PyObject *obj, void *context)
static PyGetSetDef subtype_getsets_full[] = {
{"__dict__", subtype_dict, subtype_setdict,
PyDoc_STR("dictionary for instance variables (if defined)")},
PyDoc_STR("dictionary for instance variables")},
{"__weakref__", subtype_getweakref, NULL,
PyDoc_STR("list of weak references to the object (if defined)")},
PyDoc_STR("list of weak references to the object")},
{0}
};
static PyGetSetDef subtype_getsets_dict_only[] = {
{"__dict__", subtype_dict, subtype_setdict,
PyDoc_STR("dictionary for instance variables (if defined)")},
PyDoc_STR("dictionary for instance variables")},
{0}
};
static PyGetSetDef subtype_getsets_weakref_only[] = {
{"__weakref__", subtype_getweakref, NULL,
PyDoc_STR("list of weak references to the object (if defined)")},
PyDoc_STR("list of weak references to the object")},
{0}
};