diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-27 10:40:20 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-27 10:40:20 (GMT) |
commit | ff737954f3ee3005236133fc51b55a508b11aa06 (patch) | |
tree | b65ae9e39e774bd73674b5088e549d09a7bfd7d6 /Doc/library/inspect.rst | |
parent | 0d3fb8a944a810f421377d5823cbc006700b3c1d (diff) | |
download | cpython-ff737954f3ee3005236133fc51b55a508b11aa06.zip cpython-ff737954f3ee3005236133fc51b55a508b11aa06.tar.gz cpython-ff737954f3ee3005236133fc51b55a508b11aa06.tar.bz2 |
Removed the API to create unbound methods and simplified the API for bound methods. The signature is PyMethod_New(func, instance).
Also removed im_class and renamed im_self to __self__ and im_func to __func__. im_class can be substituted with method.__self__.__class__.
I've also updated some parts of the documenation.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r-- | Doc/library/inspect.rst | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index cf14de9..988b737 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -49,14 +49,11 @@ attributes: | | __name__ | name with which this | | | | method was defined | +-----------+-----------------+---------------------------+ -| | im_class | class object that asked | -| | | for this method | -+-----------+-----------------+---------------------------+ -| | im_func | function object | +| | __func__ | function object | | | | containing implementation | | | | of method | +-----------+-----------------+---------------------------+ -| | im_self | instance to which this | +| | __self__ | instance to which this | | | | method is bound, or | | | | ``None`` | +-----------+-----------------+---------------------------+ @@ -264,7 +261,7 @@ attributes: Methods implemented via descriptors that also pass one of the other tests return false from the :func:`ismethoddescriptor` test, simply because the other tests promise more -- you can, e.g., count on having the - :attr:`im_func` attribute (etc) when an object passes :func:`ismethod`. + :attr:`__func__` attribute (etc) when an object passes :func:`ismethod`. .. function:: isdatadescriptor(object) |