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 thomaspinckney3
Recipients thomaspinckney3
Date 2008-12-10.02:47:57
SpamBayes Score 0.039795592
Marked as misclassified No
Message-id <1228877279.97.0.446063330744.issue4615@psf.upfronthosting.co.za>
In-reply-to
Content
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)
        else:
            k = x
        if k in keys:
            continue
        keys.add(k)
        yield(x)
History
Date User Action Args
2008-12-10 02:48:00thomaspinckney3setrecipients: + thomaspinckney3
2008-12-10 02:47:59thomaspinckney3setmessageid: <1228877279.97.0.446063330744.issue4615@psf.upfronthosting.co.za>
2008-12-10 02:47:58thomaspinckney3linkissue4615 messages
2008-12-10 02:47:58thomaspinckney3create