Revision 2699
Added by Aaron Marcuse-Kubitza over 12 years ago
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
lists.py: uniqify(): Document that it will work on any iterable, not just lists