PyREPL: auto-complete module attributes in import statements
Feature or enhancement
Proposal:
Support for auto-completion of import statements can be separated between
- Modules suggestions (Readline completion of module names in import statements #69605): done by @tomasr8 ๐
- Attributes suggestions: more complex, since we cannot reliably know which attributes to suggest if their module is not imported yet.
As discussed on Discourse, automatically importing modules when pressing TAB would be too intrusive and unsafe, considering import-time side effects.
A solution that seems acceptable to most people, though, is to prompt the user to press TAB again to import the module and see its contents.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/looking-for-feedback-on-adding-import-autocomplete-to-pyrepl/82281