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 RPecor
Recipients RPecor, jack__d
Date 2021-07-27.23:58:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627430323.13.0.0786165888773.issue44752@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-07-27 23:58:43RPecorsetrecipients: + RPecor, jack__d
2021-07-27 23:58:43RPecorsetmessageid: <1627430323.13.0.0786165888773.issue44752@roundup.psfhosted.org>
2021-07-27 23:58:43RPecorlinkissue44752 messages
2021-07-27 23:58:43RPecorcreate