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 AlexWaygood
Recipients AlexWaygood, barry, eli.bendersky, ethan.furman, serhiy.storchaka
Date 2021-10-21.16:53:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634835190.02.0.26490275612.issue45535@roundup.psfhosted.org>
In-reply-to
Content
I had a go at writing a patch for `__dir__` that would include any methods an enum class had acquired through `int`/`str`/etc. mixins, while continuing to ignore enum dunders and sunders (as is currently the case). My patch also allows user-defined methods defined in enum subclasses to show up in the `help()` output, whereas they currently do not, since `help(enum_member)` looks up `dir(enum_class)` rather than `dir(enum_member)`.

The patch is a fair way more complex than the the existing code, however.
History
Date User Action Args
2021-10-21 16:53:10AlexWaygoodsetrecipients: + AlexWaygood, barry, eli.bendersky, ethan.furman, serhiy.storchaka
2021-10-21 16:53:10AlexWaygoodsetmessageid: <1634835190.02.0.26490275612.issue45535@roundup.psfhosted.org>
2021-10-21 16:53:10AlexWaygoodlinkissue45535 messages
2021-10-21 16:53:09AlexWaygoodcreate