Returns a list with duplicates removed from the iterable `it`.

    Order is preserved.
358564
def duplicates_removed(it, already_seen=()):
    
    lst = []
    seen = set()
    for i in it:
        if i in seen or i in already_seen:
            continue
        lst.append(i)
        seen.add(i)
    return lst
98749
def copy(self):
        
        dup = type(self)()
        dup._indices = OrderedDict(
            (k, list(v)) for k,v in six.iteritems(self._indices)
        )
        dup._lines = self._lines.copy()
        return dup
125515
def unique (inlist):
    
    uniques = []
    for item in inlist:
        if item not in uniques:
            uniques.append(item)
    return uniques
683065
def iterallvalues(self, key=_absent):
        '''
        
        '''
        if key is not _absent:
            if key in self:
                return iter(self.getlist(key))
            raise KeyError(key)
        return self._items.itervalues()
760246
def ensure_list(iterable: Iterable[A]) -> List[A]:
    
    if isinstance(iterable, list):
        return iterable
    else:
        return list(iterable)
612037
def unique(_list):
    
    ret = []

    for item in _list:
        if item not in ret:
            ret.append(item)

    return ret
182257
def items(self):
        
        temp = self.clone()
        return [(f, getattr(temp, f)) for f in iter(self)]
63490
def unique(enumeration):
    """"""
    duplicates = []
    for name, member in enumeration.__members__.items():
        if name != member.name:
            duplicates.append((name, member.name))
    if duplicates:
        duplicate_names = ', '.join(
                ["%s -> %s" % (alias, name) for (alias, name) in duplicates]
                )
        raise ValueError('duplicate names found in %r: %s' %
                (enumeration, duplicate_names)
                )
    return enumeration
594875
def dedupe_list(l):
    
    result = []

    for el in l:
        if el not in result:
            result.append(el)

    return result
654729
public static <T> List<T> iterToList(final Iterable<T> it) {
        if (it instanceof List) {
            return (List<T>) it;
        }
        if (it == null) {
            return null;
        }

        final List<T> ar = new ArrayList<T>();
        for (final T o : it) {
            ar.add(o);
        }

        return ar;
    }
593583
def remove_duplicates(lst):
    
    dset = set()
    return [l for l in lst if l not in dset and not dset.add(l)]
806152
public static <T> List<T> list(Iterable<T> iterable)
	{
		List<T> list = new ArrayList<T>();

		for (T item : iterable)
		{
			list.add(item);
		}
		return list;
	}
890845
def unique_iter(seq):
    
    seen = set()
    return [x for x in seq if x not in seen and not seen.add(x)]
188772
def copy_iterator(self):
        
        self.__udiff, iterator_copy = itertools.tee(self.__udiff)
        return iterator_copy
910188
def _deduplicate(lst):
    """"""
    out = []
    for i in lst:
        if i not in out:
            out.append(i)
    return out
1037557
public static <T> Iterator<T> unique(Iterator<T> self, Comparator<T> comparator) {
        return toList((Iterable<T>) unique(toList(self), comparator)).listIterator();
    }
647040
@SuppressWarnings("unchecked")
	static <T> List<T> toList(final Iterable<? extends T> iterable)
	{
		if (iterable instanceof List)
		{
			return (List<T>) iterable;
		}
		return ImmutableList.copyOf(iterable);
	}