I came across a code that looked like this:
class State(IntEnum):
READY = 1
IN_PROGRESS = 2
FINISHED = 3
FAILED = 4
and I came to the conclusion that this State class could inherit the Enum class in the same way.
What does inheriting from IntEnum gives me that inheriting from the regular class Enum won't? What is the difference between them?
Base class for creating enumerated constants that are also subclasses of int.. This doesn't tell you why should you use one over the other, even thought one is more suitable for me. I found the use case and the explanation of @mehrdad-pedramfar very helpful.