summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 056400d..73dd613 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -381,7 +381,7 @@ class EnumMeta(type):
# special processing needed for names?
if isinstance(names, str):
names = names.replace(',', ' ').split()
- if isinstance(names, (tuple, list)) and isinstance(names[0], str):
+ if isinstance(names, (tuple, list)) and names and isinstance(names[0], str):
original_names, names = names, []
last_values = []
for count, name in enumerate(original_names):