Project

General

Profile

« Previous | Next » 

Revision 2699

lists.py: uniqify(): Document that it will work on any iterable, not just lists

View differences:

lib/lists.py
8 8
        except IndexError: break
9 9

  
10 10
def uniqify(list_):
11
    '''Removes duplicates from a list. Preserves order.'''
11
    '''Removes duplicates from an iterable. Preserves order.'''
12 12
    existing = set()
13 13
    new_list = []
14 14
    for value in list_:

Also available in: Unified diff