diff options
| author | Rapptz <[email protected]> | 2019-06-09 02:02:06 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-06-09 02:02:06 -0400 |
| commit | 6931189b92d72b6563b73337e0e499be10aaf703 (patch) | |
| tree | 864a62aadd361a1dd44dc1c74bc3757ad935ddb0 | |
| parent | Add EnumMeta.__len__ to not break user avatar code. (diff) | |
| download | discord.py-6931189b92d72b6563b73337e0e499be10aaf703.tar.xz discord.py-6931189b92d72b6563b73337e0e499be10aaf703.zip | |
Add EnumMeta.__reversed__ just in case someone does this.
I sure hope not.
| -rw-r--r-- | discord/enums.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/enums.py b/discord/enums.py index 82371008..89da6aa6 100644 --- a/discord/enums.py +++ b/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_) |