[New-bugs-announce] [issue7883] CallTips.py _find_constructor does not work

Bernt Røskar Brenna report at bugs.python.org
Mon Feb 8 13:11:43 CET 2010

New submission from Bernt Røskar Brenna <bernt.brenna at gmail.com>:

Test case:

In IDLE python shell:
>>> from http.client import HTTPConnection
>>> c = HTTPConnection(

Notice that the call tip is an empty parenthesis.

This patch works for me:

$ svn diff
Index: CallTips.py
--- CallTips.py (revision 78103)
+++ CallTips.py (working copy)
@@ -116,7 +116,7 @@
 def _find_constructor(class_ob):
     "Find the nearest __init__() in the class tree."
-        return class_ob.__init__.__func__
+        return class_ob.__init__
     except AttributeError:
         for base in class_ob.__bases__:
             init = _find_constructor(base)

components: IDLE
messages: 99043
nosy: Bernt.Røskar.Brenna
severity: normal
status: open
title: CallTips.py _find_constructor does not work
type: behavior
versions: Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list