[issue3396] rlcompleter can't autocomplete members of callable objects

Guilherme Polo report at bugs.python.org
Thu Jul 17 23:52:52 CEST 2008


Guilherme Polo <ggpolo at gmail.com> added the comment:

This is somewhat obscure to notice but the problem is towards that
getattr on attr_matches. For "int" specifically, it will try to get the
attribute '__abstractmethods__' (which is a member of int.__class__) and
will raise an AttributeError but then the exception is discarded by the
readline module.
A workaround is to change that getattr to:

try:
    val = getattr(object, word)
except AttributeError:
    continue

----------
nosy: +gpolo

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


More information about the Python-bugs-list mailing list