This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author baker.dylan.c
Recipients baker.dylan.c, ethan.furman, hroncok
Date 2021-02-09.00:43:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612831416.44.0.250326958621.issue43162@roundup.psfhosted.org>
In-reply-to
Content
Author of said meson code here. I use this pattern when the enum names and values are implementation details, but the string values are user visible. In this case the enum itself is used internally to represent what kind of test we're doing, but we're initializing it from user input. There might be reasons in the future that the names of the enum members and the string values being passed in aren't the same anymore, say because we map two string values to one enum value. I guess I could accomplish the same thing with a staticmethod or helper function, but the code is effectively an alternate initializer, and follows that pattern using a classmethod.
History
Date User Action Args
2021-02-09 00:43:36baker.dylan.csetrecipients: + baker.dylan.c, ethan.furman, hroncok
2021-02-09 00:43:36baker.dylan.csetmessageid: <1612831416.44.0.250326958621.issue43162@roundup.psfhosted.org>
2021-02-09 00:43:36baker.dylan.clinkissue43162 messages
2021-02-09 00:43:36baker.dylan.ccreate