Message77477
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) |
|
Date |
User |
Action |
Args |
2008-12-10 02:48:00 | thomaspinckney3 | set | recipients:
+ thomaspinckney3 |
2008-12-10 02:47:59 | thomaspinckney3 | set | messageid: <1228877279.97.0.446063330744.issue4615@psf.upfronthosting.co.za> |
2008-12-10 02:47:58 | thomaspinckney3 | link | issue4615 messages |
2008-12-10 02:47:58 | thomaspinckney3 | create | |
|