Ryan Pecor <r...@pecor.com> added the comment:

Actually, hasattr() specifically states that it uses getattr() so that behavior 
is expected from getattr() so I will not be creating a separate issue for that.

Now that I see hasattr() uses getattr(), it looks like the tab completion issue 
might not stem from line 155, but from line 180 
(https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/rlcompleter.py#L180)
 where it calls getattr().

A possible fix to the tab completion issue might be to add to/expand the 
warning about evaluating arbitrary C code 
(https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/rlcompleter.py#L145)
 when using tab to autocomplete.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44752>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to