mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-09 17:59:04 +00:00
Add EnumMeta.__reversed__ just in case someone does this.
I sure hope not.
This commit is contained in:
1 parent
a92b4c2093
commit
6931189b92
1 file changed
+3
@@ -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_)
|
||||
|
||||
|
||||
Reference in new issue
Block a user