Bugs item #1027566, was opened at 2004-09-13 18:17
Message generated for change (Comment added) made by kbk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1027566&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Loren Guthrie (lguthrie)
Assigned to: Kurt B. Kaiser (kbk)
Summary: Argument missing from calltip for new-style class init

Initial Comment:
The calltip for __init__ on new-style classes doesn't
show the arguments like it does for old-style classes.

>>> import idlelib.CallTips
>>> class OldClass:
...     """Old-style class"""
...     def __init__(self, x):
...             self.x = x
... 
>>> idlelib.CallTips.get_arg_text(OldClass)
'(x)\nOld-style class'
>>> class NewClass(object):
...     """New-style class"""
...     def __init__(self, x):
...             self.x = x
... 
>>> idlelib.CallTips.get_arg_text(NewClass)
'New-style class'

Changing CallTips.py line 134 (in get_arg_text) from
if type(ob)==types.ClassType:
to
if type(ob) in [types.ClassType, types.TypeType]:

SEEMS to fix the problem, but I have no idea what
side-effects this might have.

----------------------------------------------------------------------

>Comment By: Kurt B. Kaiser (kbk)
Date: 2006-07-23 00:20

Message:
Logged In: YES 
user_id=149084

Rev 50776.  Thanks for the patch!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1027566&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to