Message377186
Due to the nature of `str`, if an Enum tries to mixin the str type, all of it's members will be strings -- even if they didn't start out that way:
class MyStrEnum(str, Enum):
tuple = 'oops',
okay = 'correct'
>>> list(MyStrEnum)
[<MyStrEnum.tuple: "('oops',)">, MyStrEnum.okay: 'correct'>]
The StrEnum class will have a check to ensure that each value was already a string, or can be converted to a string via
str(bytes, encoding, errors) |
|
Date |
User |
Action |
Args |
2020-09-19 19:20:58 | ethan.furman | set | recipients:
+ ethan.furman, barry, terry.reedy, eli.bendersky, serhiy.storchaka |
2020-09-19 19:20:58 | ethan.furman | set | messageid: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> |
2020-09-19 19:20:58 | ethan.furman | link | issue41816 messages |
2020-09-19 19:20:58 | ethan.furman | create | |
|