Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 6 Objects/classobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ static PyMethodDef method_methods[] = {
#define MO_OFF(x) offsetof(PyMethodObject, x)

static PyMemberDef method_memberlist[] = {
{"__func__", T_OBJECT, MO_OFF(im_func), READONLY|RESTRICTED,
{"__func__", T_OBJECT, MO_OFF(im_func), READONLY,
"the function (or other callable) implementing a method"},
{"__self__", T_OBJECT, MO_OFF(im_self), READONLY|RESTRICTED,
{"__self__", T_OBJECT, MO_OFF(im_self), READONLY,
"the instance to which a method is bound"},
{NULL} /* Sentinel */
};
Expand Down Expand Up @@ -405,7 +405,7 @@ PyInstanceMethod_Function(PyObject *im)
#define IMO_OFF(x) offsetof(PyInstanceMethodObject, x)

static PyMemberDef instancemethod_memberlist[] = {
{"__func__", T_OBJECT, IMO_OFF(func), READONLY|RESTRICTED,
{"__func__", T_OBJECT, IMO_OFF(func), READONLY,
"the function (or other callable) implementing a method"},
{NULL} /* Sentinel */
};
Expand Down
10 changes: 4 additions & 6 deletions 10 Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,10 @@ PyFunction_SetAnnotations(PyObject *op, PyObject *annotations)
#define OFF(x) offsetof(PyFunctionObject, x)

static PyMemberDef func_memberlist[] = {
{"__closure__", T_OBJECT, OFF(func_closure),
RESTRICTED|READONLY},
{"__doc__", T_OBJECT, OFF(func_doc), PY_WRITE_RESTRICTED},
{"__globals__", T_OBJECT, OFF(func_globals),
RESTRICTED|READONLY},
{"__module__", T_OBJECT, OFF(func_module), PY_WRITE_RESTRICTED},
{"__closure__", T_OBJECT, OFF(func_closure), READONLY},
{"__doc__", T_OBJECT, OFF(func_doc), 0},
{"__globals__", T_OBJECT, OFF(func_globals), READONLY},
{"__module__", T_OBJECT, OFF(func_module), 0},
{NULL} /* Sentinel */
};

Expand Down
2 changes: 1 addition & 1 deletion 2 Objects/methodobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static PyGetSetDef meth_getsets [] = {
#define OFF(x) offsetof(PyCFunctionObject, x)

static PyMemberDef meth_members[] = {
{"__module__", T_OBJECT, OFF(m_module), PY_WRITE_RESTRICTED},
{"__module__", T_OBJECT, OFF(m_module), 0},
Comment thread
jdemeyer marked this conversation as resolved.
{NULL}
};

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.