summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index e51850d..a8a50a5 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -250,7 +250,7 @@ class _proto_member:
delattr(enum_class, member_name)
# second step: create member based on enum_class
value = self.value
- if type(value) is not tuple:
+ if not isinstance(value, tuple):
args = (value, )
else:
args = value
@@ -1777,7 +1777,7 @@ def _simple_enum(etype=Enum, *, boundary=None, use_args=None):
else:
# create the member
if use_args:
- if type(value) is not tuple:
+ if not isinstance(value, tuple):
value = (value, )
member = new_member(enum_class, *value)
value = value[0]
@@ -1826,7 +1826,7 @@ def _simple_enum(etype=Enum, *, boundary=None, use_args=None):
else:
# create the member
if use_args:
- if type(value) is not tuple:
+ if not isinstance(value, tuple):
value = (value, )
member = new_member(enum_class, *value)
value = value[0]