diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-17 14:36:13 +0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-17 14:36:13 +0200 |
commit | 362040299d52a33a2cf61f0a6e1111ec70a5263b (patch) | |
tree | b9a0d9d26325be1889f4f56f60187509e2059236 /service/pixelated/support/functional.py | |
parent | a383985643419f85bc7b07a2dcf97cdd15c89783 (diff) |
better tests for getting all tags and filtering all tags. some fixes go together
Diffstat (limited to 'service/pixelated/support/functional.py')
-rw-r--r-- | service/pixelated/support/functional.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/pixelated/support/functional.py b/service/pixelated/support/functional.py index e779f5bc..8d258635 100644 --- a/service/pixelated/support/functional.py +++ b/service/pixelated/support/functional.py @@ -18,3 +18,9 @@ from itertools import chain def flatten(_list): return list(chain.from_iterable(_list)) + + +def unique(_list): + seen = set() + seen_add = seen.add + return [ x for x in _list if not (x in seen or seen_add(x))] |