[issue25663] Make rlcompleter avoid duplicate global names

2015-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d3a9b055206c by Martin Panter in branch '2.7': Issue #25663: Make rlcompleter avoid duplicate global names https://hg.python.org/cpython/rev/d3a9b055206c -- ___ Python tracker

[issue25663] Make rlcompleter avoid duplicate global names

2015-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4799615f4f26 by Martin Panter in branch '3.4': Issue #25663: Make rlcompleter avoid duplicate global names https://hg.python.org/cpython/rev/4799615f4f26 New changeset 4ed70c568baf by Martin Panter in branch '3.5': Issue #25663: Merge rlcompleter

[issue25663] Make rlcompleter avoid duplicate global names

2015-11-23 Thread Martin Panter
Martin Panter added the comment: I chose to keep my strategy of using the set. Using a dictionary to hold the matches could mess up the order, although it looks like Readline sorts the matches before displaying them. -- resolution: -> fixed stage: patch review -> resolved status:

[issue25663] Make rlcompleter avoid duplicate global names

2015-11-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nice work. An alternative approach is to make "matches" a dict. And instead of if match not in seen: seen.add(word) matches.append(match) use just matches[word] = match I don't know what approach is better. Added other minor

[issue25663] Make rlcompleter avoid duplicate global names

2015-11-18 Thread Martin Panter
New submission from Martin Panter: When playing with the Editline alternative to Readline, I noticed that “global” name completions can include duplicates: >>> No None NotADirectoryError( NotImplementedError( None NotImplemented >>> None None None It

[issue25663] Make rlcompleter avoid duplicate global names

2015-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___