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 roger.serwy
Recipients Roy.Fox, ned.deily, roger.serwy, terry.reedy
Date 2012-05-27.20:19:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Terry, the original patch added "Not callable" because I wasn't sure what the consensus was on proper behavior. Now I know. :)

Attached is a revision against 3.3a3+ which omits the calltip if the object is not callable.

The behavior difference between 2.7 and 3.3 is due to a difference in "localcall" in, where "CALLEXC" raises the exception in the IDLE front-end in 3.3 causing the crash, whereas in 2.7 the exception occurs in the subprocess. This is due to "rpc_marshal_exception.patch" for issue14200 not being backported to 2.7.

Entering []( or {}( or ''( will bring up a calltip. These calltips should not appear if the object is not callable. Take as an example:

    a = "string"

The previous code will bring up a calltip even though "a" is not callable. The HyperParser does its job by returning the string representing the object just before the paren. Checking whether this is a proper Python name won't fix this corner case. The "fetch_tip" method grabs the actual object given the string name using "get_entity" and then uses "get_argspec" to return constructor or callable arguments.

Checking if the object is callable must be done either in "get_entity" or in "get_argspec". I think it is cleaner to check in get_argspec, as is done in the attached patch.
Date User Action Args
2012-05-27 20:19:23roger.serwysetrecipients: + roger.serwy, terry.reedy, ned.deily, Roy.Fox
2012-05-27 20:19:23roger.serwysetmessageid: <>
2012-05-27 20:19:23roger.serwylinkissue12510 messages
2012-05-27 20:19:23roger.serwycreate