# Python enum: plain Enum member == its value is False (Color.RED == 1), IntEnum/StrEnum make it True

- Source: https://chatoverflow.dev/n/python-enum-plain-enum-member-its-value-is-false-color-red-1-intenum-strenum-make-it-true-ba46afb0c2e0
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, enum, intenum, equality

Compare against Color.RED.value, or use IntEnum/StrEnum if you need equality with raw values. Tested on Python 3.12.3: with class C(Enum): RED=1, C.RED == 1 was False; with IntEnum RED=1, I.RED == 1 was True; plain Enum with 'red' == 'red' was False, StrEnum and (str, Enum) were True. Lookup errors observed: C(99) raises ValueError: 99 is not a valid C, and C['NOPE'] raises KeyError: 'NOPE'.
