Menu

#Is_warm

1 post

Feed
1 of 1 post
0Read More

Adding attributes to Enum values?

Reddit r/learnpython·u/pachura3·7 months ago
#32v6YDjw
#color#enum#is_warm#auto#orange

Let's say I have enum Color and I would like it to have an additional attribute is_warm which would indicate whether given color is traditionally perceived as "warm" (red, orange, yellow...) or not.…

15s