Reuven M. Lerner @lernerpython.com · 4d

Want a #Python Enum, but don't care about the values? Use auto: from enum import Enum, auto class Days(Enum): SUN = auto() MON = auto() TUE = auto() You can now use Days.SUN and Days.MON. With auto, you care the Enum's values are different, not what they are.

2 likes 0 replies

?