Enums in python - set by name and value
God I need to read documentation, all of it, including not-important sounding first sentences.
.. you can set using both.
- use call syntax to return members by value
- use index syntax to return members by name
class MyEnum(str,Enum): IG2 = "val1" IG3 = "val2" MyEnum("val1") == MyEnum["IG3"]
Nel mezzo del deserto posso dire tutto quello che voglio.