[issue41549] IDLE leaks `_` into hint box

Serhiy Storchaka report at bugs.python.org
Fri Aug 14 14:57:56 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I think that I understood what is the issue.

1. Open the IDLE editor, type "foo" and press <Ctrl-Space>. The pop-up list does not contain "foo".
2. Switch to the IDLE shell, type "foo = 1" and press <Enter>.
3. Switch back to the IDLE editor (the cursor points after "foo") and press <Ctrl-Space> again. The pop-up list contains now "foo".

The problem is that the completion list for editor contains names from the shell instead of only from builtins. When you run the code from the editor, names from the shell are not automatically available.

It can be a feature if you use the same star-import in the shell and editor, but it can also be considered as a bug.

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

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41549>
_______________________________________


More information about the Python-bugs-list mailing list