0 points

Convert string to Enum in Python - Stack Overflow


dashboard

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

Posted by @arielvol #python

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

Build['debug']

content_copy Copy

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