mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Add docstring
This commit is contained in:
parent
e0316880b4
commit
7b2bc1bc38
1 changed files with 3 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ def split_sequence(s, f):
|
||||||
|
|
||||||
|
|
||||||
def uniq(s):
|
def uniq(s):
|
||||||
|
'''Filter duplicates while preserving order. ``set`` can almost always be
|
||||||
|
used instead of this, but preserving order might prove useful for
|
||||||
|
debugging.'''
|
||||||
d = set()
|
d = set()
|
||||||
for x in s:
|
for x in s:
|
||||||
if x not in d:
|
if x not in d:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue