summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index a0cad06..21f6388 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -685,7 +685,7 @@ class EnumType(type):
'member order does not match _order_:\n %r\n %r'
% (enum_class._member_names_, _order_)
)
-
+ #
return enum_class
def __bool__(cls):
@@ -1083,6 +1083,13 @@ class Enum(metaclass=EnumType):
attributes -- see the documentation for details.
"""
+ @classmethod
+ def __signature__(cls):
+ if cls._member_names_:
+ return '(*values)'
+ else:
+ return '(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)'
+
def __new__(cls, value):
# all enum instances are actually created during class construction
# without calling this method; this method is called by the metaclass'