User Tools

Site Tools


Sidebar

Writing /opt/bitnami/dokuwiki/data/meta/git/delete-tag.meta failed
Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.

Go Back

Contact
Recent Changes
Sitemap
snippets:get_all_values_from_python_enum_class

Get all values from Python enum class

https://stackoverflow.com/questions/29503339/how-to-get-all-values-from-python-enum-class

class Color(Enum):
    RED = 1
    BLUE = 2

values = [e.value for e in Color]
snippets/get_all_values_from_python_enum_class.txt · Last modified: 2020/04/14 19:11 by whtsky