-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
Hello,
I'm wondering the following regarding Enum.__signature__
:
- Why return a
str
(better suited for__text_signature__
isn't it?) - When there are members, why choose
'(*values)'
over the more accurate (I think)'(value)'
?
Lines 1148 to 1150 in f218549
def __signature__(cls): | |
if cls._member_names_: | |
return '(*values)' |
If acted upon, I think it would be better to replace current signatures with Signature
types. For example for enums with members:
__signature__ = Signature([Parameter("value", Parameter.POSITIONAL_OR_KEYWORD)])
All the best!
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement