Browse Source

Add EnumMeta.__reversed__ just in case someone does this.

I sure hope not.
pull/2209/head
Rapptz 6 years ago
parent
commit
6931189b92
  1. 3
      discord/enums.py

3
discord/enums.py

@ -97,6 +97,9 @@ class EnumMeta(type):
def __iter__(cls):
return (cls._enum_member_map_[name] for name in cls._enum_member_names_)
def __reversed__(cls):
return (cls._enum_member_map_[name] for name in reversed(cls._enum_member_names_))
def __len__(cls):
return len(cls._enum_member_names_)

Loading…
Cancel
Save