On 9 Apr 2006, at 23:03, jmorliaguet wrote:
--- cpsskins/branches/jmo-perspectives/elements/element.py      (original)
+++ cpsskins/branches/jmo-perspectives/elements/element.py Sun Apr 9 23:03:47 2006
@@ -33,6 +33,10 @@
 from cpsskins.relations.interfaces import IRelatable
 from cpsskins.setup.interfaces import IResourceType

+def uniq(seq):
+    set = {}
+    return [set.setdefault(e, e) for e in seq if e not in set]

Best done using the python builtin sets:
def uniq(seq):
    return list(set(x for x in seq))

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]



--
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to