New submission from Tom Pinckney <[EMAIL PROTECTED]>: 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) ---------- 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue4615> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com