May-12-2019, 08:23 PM
(May-11-2019, 05:43 AM)perfringo Wrote: Assuming that objective is to dedupe hashable objects in iterable while maintaining order:
def dedupe(iterable): seen = set() for item in iterable: if item not in seen: yield item seen.add(item)
either hashable or references to the same object. so a set() won't do; it will need to be a list, at least for the non-hashables. deep leaf comparison is not needed.
so, it doesn't pre-exist.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.