Convert string to Enum in Python - Stack Overflow


PHOTO EMBED

Sun Aug 30 2020 18:34:38 GMT+0000 (UTC)

Saved by @arielvol #python

>>> from enum import Enum
>>> class Build(Enum):
...   debug = 200
...   build = 400
... 

Build['debug']

content_copyCOPY

https://stackoverflow.com/questions/41407414/convert-string-to-enum-in-python