summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-18 04:46:00 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-18 04:46:00 (GMT)
commitb1d3d96374294904a13717403c80035718331092 (patch)
treefb348c08b9d4460e7b254754fffe91eb13ba8417 /Objects
parent3781aef8f8f992f78b31c7029004fa7b1ada7304 (diff)
downloadcpython-b1d3d96374294904a13717403c80035718331092.zip
cpython-b1d3d96374294904a13717403c80035718331092.tar.gz
cpython-b1d3d96374294904a13717403c80035718331092.tar.bz2
Issue 2332: add new attribute names for instance method objects
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 6c77153..caf6b3e 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -2242,8 +2242,12 @@ static PyMemberDef instancemethod_memberlist[] = {
"the class associated with a method"},
{"im_func", T_OBJECT, OFF(im_func), READONLY|RESTRICTED,
"the function (or other callable) implementing a method"},
+ {"__func__", T_OBJECT, OFF(im_func), READONLY|RESTRICTED,
+ "the function (or other callable) implementing a method"},
{"im_self", T_OBJECT, OFF(im_self), READONLY|RESTRICTED,
"the instance to which a method is bound; None for unbound methods"},
+ {"__self__", T_OBJECT, OFF(im_self), READONLY|RESTRICTED,
+ "the instance to which a method is bound; None for unbound methods"},
{NULL} /* Sentinel */
};