That's a problem with any attempt to find an enum member by value, since values aren't guaranteed to be unique. With either proposal, we'd just need to pick one - probably the one that appears first in the class dict.

On Tue, Mar 16, 2021, 2:39 PM Marco Sulla <> wrote:
On Tue, 16 Mar 2021 at 05:38, Matt Wozniski <> wrote:
> Color.from_value(1)  # returns Color.RED

What if I have an alias?
Python-ideas mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct: