summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 1d9ebf0..c28f345 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -106,6 +106,10 @@ class EnumMeta(type):
raise ValueError('Invalid enum member name: {0}'.format(
','.join(invalid_names)))
+ # create a default docstring if one has not been provided
+ if '__doc__' not in classdict:
+ classdict['__doc__'] = 'An enumeration.'
+
# create our new Enum type
enum_class = super().__new__(metacls, cls, bases, classdict)
enum_class._member_names_ = [] # names in definition order