diff options
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/utils.py b/discord/utils.py index 74c070c8..e74c2e99 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -137,6 +137,11 @@ def get(iterable, **attrs): return find(predicate, iterable) +def _unique(iterable): + seen = set() + adder = seen.add + return [x for x in iterable if not (x in seen or adder(x))] + def _null_event(*args, **kwargs): pass |