mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Add EnumMeta.__reversed__ just in case someone does this.
I sure hope not.
This commit is contained in:
parent
a92b4c2093
commit
6931189b92
@ -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…
x
Reference in New Issue
Block a user