[issue16630] IDLE: Calltip fails if __getattr__ raises exception

Serhiy Storchaka report at bugs.python.org
Fri Dec 7 11:02:51 CET 2012


Serhiy Storchaka added the comment:

1. rpcclt.remotecall also can raise an exception.

2. I think fetch_tip() should return '' in case of exception as for non-existent arguments or for non-callables. You can add tests for this cases too.

3. "break" is a reserved word. It's not a good name for an attribute.

4. It will be better test for exception an instance of the special class and not break TC.

class Broken:
    def __getattr__(self, name):
        raise Exception('Broken __getattr__')

brocken = Broken()
test('brocken', '')

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16630>
_______________________________________


More information about the Python-bugs-list mailing list