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 terry.reedy
Recipients Roy.Fox, ned.deily, roger.serwy, terry.reedy
Date 2012-05-27.07:31:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338103873.39.0.395199158638.issue12510@psf.upfronthosting.co.za>
In-reply-to
Content
With 2.7 & 3.3 on Win 7, 'a'( brings up calltip (bad).
With 3.3, '\xyz'( causes Idle to die (worse)
With 2.7, the same or u'\xyz'( have no effect, just like 3(.

There are a lot of little differences between 2.7 and 3.x, but the main one is the use of inspect in 3.x. I do not see an obvious reason for the behavior difference.

With patch, 'a'( brings up calltip with 'Not callable' added (worse, in my opinion), while '\xyz'( does nothing, just like 3( (or 2.7, great).

Roger, perhaps you uploaded your initial test past instead of the final patch. A string instance should act like any other non-callable instance.

That said, the patch strikes me as attacking the problem at the wrong end. Str instances are not names and get_argspec should never be called on one (I am presuming that it is not called on other non-callables, such as int instances). Similarly, back up further in the call stack, fetch_tip(name) should only be called on names. I wonder if the problem might be back up in open_calltip(), perhaps after

        hp = HyperParser(self.editwin, "insert")
        sur_paren = hp.get_surrounding_brackets('(')
        if not sur_paren:
            return
        hp.set_index(sur_paren[0])
        name = hp.get_expression()

(argggh! I have no idea how to debug code where I cannot just insert print statements to tell me what is getting called with what arguments.)
History
Date User Action Args
2012-05-27 07:31:13terry.reedysetrecipients: + terry.reedy, ned.deily, roger.serwy, Roy.Fox
2012-05-27 07:31:13terry.reedysetmessageid: <1338103873.39.0.395199158638.issue12510@psf.upfronthosting.co.za>
2012-05-27 07:31:12terry.reedylinkissue12510 messages
2012-05-27 07:31:11terry.reedycreate