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 donlorenzo
Recipients donlorenzo
Date 2014-08-05.16:13:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407255195.5.0.870338576239.issue22143@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-08-05 16:13:15donlorenzosetrecipients: + donlorenzo
2014-08-05 16:13:15donlorenzosetmessageid: <1407255195.5.0.870338576239.issue22143@psf.upfronthosting.co.za>
2014-08-05 16:13:15donlorenzolinkissue22143 messages
2014-08-05 16:13:15donlorenzocreate