➜

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.

作者 terry.reedy
收信人 roger.serwy, serhiy.storchaka, terry.reedy
日期 2014-01-10.02:08:07
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1389319688.47.0.312616758639.issue16630@psf.upfronthosting.co.za>
In-reply-to
内容
Get_entity already has try-except to block exceptions propagating from eval failure, so wrapping it is redundant. We only need worry about get_argspec.

I presume the failure is in get_argspec in the remote process:
    if hasattr(ob, '__call__'):
This can be replaced by callable(ob) as it converts exceptions to False. The appropriate return for non-callables is the current default, '', which results in no tip.

There are, however, other attribute accesses that could fail. I am reluctant to wrap get_argspec in its entirety, as that would mask bugs in Idle code as well as in user snippets. So I think each access should be protected. Since users will expect a tip for something that is a callable, I think a message might be appropriate. I checked that getattr(ob, name, default) does not convert exception to default.

Their are rpc calls in several places in Idle code. Unless failure can be triggered here in particular by user error, I do not think we should add specific protection here.
历史
日期 用户 动作 参数
2014-01-10 02:08:08terry.reedy修改recipients: + terry.reedy, roger.serwy, serhiy.storchaka
2014-01-10 02:08:08terry.reedy修改messageid: <1389319688.47.0.312616758639.issue16630@psf.upfronthosting.co.za>
2014-01-10 02:08:08terry.reedy链接issue16630 messages
2014-01-10 02:08:07terry.reedy创建