[New-bugs-announce] [issue4615] de-duping function in itertools

Tom Pinckney report at bugs.python.org
Wed Dec 10 03:47:59 CET 2008

New submission from Tom Pinckney <thomaspinckney3 at gmail.com>:

Any interest in an itertools de-duping function? I find I have to write 
this over and over for different projects:

def deduped(iter,key=None):
    keys = set()
    for x in iter:
        if key:
            k = key(x)
            k = x
        if k in keys:

components: Library (Lib)
messages: 77477
nosy: thomaspinckney3
severity: normal
status: open
title: de-duping function in itertools
type: feature request
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list