Browse Source

Disallow deleting of enum attributes.

pull/2209/head
Rapptz 6 years ago
parent
commit
2b761508f1
  1. 3
      discord/enums.py

3
discord/enums.py

@ -122,6 +122,9 @@ class EnumMeta(type):
def __setattr__(cls, name, value):
raise TypeError('Enums are immutable.')
def __delattr__(cls, attr):
raise TypeError('Enums are immutable')
def __instancecheck__(self, instance):
# isinstance(x, Y)
# -> __instancecheck__(Y, x)

Loading…
Cancel
Save