New submission from Lorenz Quack: Example: >>> import rlcompleter >>> completer = rlcompleter.Completer() >>> class A(object): ... foo = None >>> class B(A): ... pass >>> b = B() >>> print([completer.complete("b.foo", i) for i in range(4)]) ['b.foo', 'b.foo', 'b.foo', None]
I would expect the completions to be unique. This happens because the possible words to match are put into a list. A possible fix is putting them into a set instead. Patch attached. ---------- components: Library (Lib) files: rlcompleter.diff keywords: patch messages: 224852 nosy: donlorenzo priority: normal severity: normal status: open title: rlcompleter.Completer has duplicate matches versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file36268/rlcompleter.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22143> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com