This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry, ncoghlan, yselivanov
Date 2014-02-21.00:19:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
inspect has a bug:
* inspect.ismethod() returns False for bound methods on builtins.

If I fix that, that exposes a bug in pydoc:
* pydoc's two docroutine() functions assume that bound methods
  have a __func__; bound builtins do not.

The only reason pydoc assumed the __func__ attribute was so it could use that instead of the bound function when getting the signature.  I don't know why it cared, but: when it does so, that means it displays "self" for bound methods implemented in Python.

However, since it doesn't do that for bound methods implemented in C, now the behavior is inconsistent.  Should it display self or not?  The consensus was, it should not.  This would make pydoc consistent with inspect.signature.

This patch therefore changes a third thing:

* pydoc: don't display "self" for bound methods implemented in Python.

I propose to merge this for 3.4.0rc2.
Date User Action Args
2014-02-21 00:19:31larrysetrecipients: + larry, ncoghlan, yselivanov
2014-02-21 00:19:31larrysetmessageid: <>
2014-02-21 00:19:31larrylinkissue20710 messages
2014-02-21 00:19:30larrycreate