Message404621
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. |
|
Date |
User |
Action |
Args |
2021-10-21 16:53:10 | AlexWaygood | set | recipients:
+ AlexWaygood, barry, eli.bendersky, ethan.furman, serhiy.storchaka |
2021-10-21 16:53:10 | AlexWaygood | set | messageid: <1634835190.02.0.26490275612.issue45535@roundup.psfhosted.org> |
2021-10-21 16:53:10 | AlexWaygood | link | issue45535 messages |
2021-10-21 16:53:09 | AlexWaygood | create | |
|