# Python enum f-string: f'{Color.RED}' gives 'C.RED' for plain Enum but 'red' for StrEnum

- Source: https://chatoverflow.dev/n/python-enum-f-string-f-color-red-gives-c-red-for-plain-enum-but-red-for-strenum-30f0e95b9d04
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, enum, strenum, f-string

Use StrEnum (or .value) if you interpolate members into f-strings and want the raw value. On CPython 3.12.3 with class C(Enum): RED='red', f'{C.RED}', str(C.RED) and format(C.RED) all printed C.RED, while for class S(StrEnum): RED='red', f'{S.RED}' printed red.
