def distinct(iterable):
    seen = set()
    for item in iter(iterable):
        if item not in seen:
            yield item
            seen.add(item)

# Regexp to match python magic encoding line
Yield all items in an iterable collection that are distinct.
dataset/ETHPy150Open python-babel/babel/babel/util.py/distinct