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 tetelevm
Recipients terry.reedy, tetelevm
Date 2021-04-10.18:50:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618080647.42.0.590241304556.issue43654@roundup.psfhosted.org>
In-reply-to
Content
Hello again!
I found another kind of bug, where the autosupplement window doesn't show up. 
In order for the bug to occur, you need to put a non-string value into `locals()`.
Example:
```
locals()['arg'] = 123  # or locals().setdefault('arg', 123)
# ^ it's okay

locals()[123] = 123  # or locals().setdefault(123, 123)
# ^ completion window is not shown
```
Of course, I know that "Whether or not updates to this dictionary will affect name lookups in the local scope and vice-versa not covered by any backwards compatibility guarantees" , but take a little bug :)

Here is the traceback of the error
```
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1885, in __call__
    return self.func(*args)
  File "/usr/lib/python3.9/idlelib/multicall.py", line 176, in handler
    r = l[i](event)
  File "/usr/lib/python3.9/idlelib/autocomplete.py", line 74, in autocomplete_event
    opened = self.open_completions(TAB)
  File "/usr/lib/python3.9/idlelib/autocomplete.py", line 146, in open_completions
    comp_lists = self.fetch_completions(comp_what, mode)
  File "/usr/lib/python3.9/idlelib/autocomplete.py", line 171, in fetch_completions
    return rpcclt.remotecall("exec", "get_the_completion_list",
  File "/usr/lib/python3.9/idlelib/rpc.py", line 219, in remotecall
    return self.asyncreturn(seq)
  File "/usr/lib/python3.9/idlelib/rpc.py", line 250, in asyncreturn
    return self.decoderesponse(response)
  File "/usr/lib/python3.9/idlelib/rpc.py", line 270, in decoderesponse
    raise what
TypeError: '<' not supported between instances of 'int' and 'str'
```
History
Date User Action Args
2021-04-10 18:50:47tetelevmsetrecipients: + tetelevm, terry.reedy
2021-04-10 18:50:47tetelevmsetmessageid: <1618080647.42.0.590241304556.issue43654@roundup.psfhosted.org>
2021-04-10 18:50:47tetelevmlinkissue43654 messages
2021-04-10 18:50:47tetelevmcreate