Maintain order in role related functions.

This commit is contained in:
Rapptz
2015-12-30 16:11:15 -05:00
parent 7765580a14
commit c69a991e46
2 changed files with 21 additions and 9 deletions

View File

@ -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