Jordan Ephron added the comment:
Oops, still getting used to the Python mailing list format. Learned
something new! Thanks for all your awesome work on Python.
On 11.06.2021 08:19, Ethan Furman wrote:
>
>Ethan Furman added the comment:
>
>Glad you like it!
>
>Please don'
Jordan Ephron added the comment:
On 10.06.2021 15:33, Ethan Furman wrote:
>Since I like puzzles, here is a working LenientStrEnum:
>...
Oh indeed, that's really cool!
--
title: Multiple enum mixins not allowed even when they have the same datatype
-> Abstract enum mixins no
Jordan Ephron added the comment:
Oh, on further investigation I see that the example wouldn't have worked on 3.8
anyway, due to issue34536 adding some checks to the type returned by _missing_,
so maybe I'm pushing Enum too far in that case
Jordan Ephron added the comment:
> But what is an `UnexpectedString()`
Sorry, that’s maybe less relevant to the example. It’s just a subclass of
string with some marker to make it detectable later on, similar to schemes that
taint user input to prevent sql injection or whatever
> On
New submission from Jordan Ephron :
Prior to 3.8 it was possible to create "abstract" enums (without members) and
mix them together. To motivate with an example, perhaps we're modeling an API
and want to be robust in the face of inconsistent casing
class CaseInsensitiveStrEnum