[issue4615] de-duping function in itertools

Raymond Hettinger report at bugs.python.org
Wed Dec 10 04:06:16 CET 2008


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Am curious about your use cases.  In what contexts are you needing to
eliminate duplicates but retain the original ordering?  Am wondering if
the proposals for an ordered dictionary will meet your needs?  Also, am
looking to see what typifies the balance of needs your use cases -- an
iterator so large that you wouldn't want to loop over it twice but a set
of unique items that doesn't grow especially large (see the code
random.sample for a similar situation).  Another thought is that the
proposal for a Bag class (multiset) may solve the problem more generally.

----------
versions: +Python 2.7, Python 3.1 -Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4615>
_______________________________________


More information about the Python-bugs-list mailing list