469,352 Members | 2,150 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Modifying CallTips.py to work with with new-style classes in IDLE.

When using Idle, Call Tips are floating windows which display function,
class, and method parameter and docstring information when you type an
opening parenthesis, and which disappear when you type a closing

But when you use new-style classes, they don't work fine and don't show
the arguments of the __init__ method.

There is a topic in this newsgroup (new style classes and an IDLE
"grump"), where a solution was given to the problem (in Mar 27 2002):
The solution seems to be simply changing line 115 in CallTips.py (in the Tools/Idle/ directory) as folows:

if type(ob)==types.ClassType:


if type(ob)==types.ClassType or type(ob) == types.TypeType:

I've tried it (Python 2.4.1 - IDLE 1.1.1) and it works fine (CallTips
was in the \Lib\idlelib directory for me).

Why isn't this the default behaviour? Is this the right place to post

Jul 19 '05 #1
0 846

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Japcuh | last post: by
15 posts views Thread by Paul Paterson | last post: by
3 posts views Thread by pytopo | last post: by
6 posts views Thread by MackS | last post: by
7 posts views Thread by Ivan Voras | last post: by
3 posts views Thread by =?Utf-8?B?Q2hhcmxlcw==?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.