Message408935
The primary purpose of __slots__ is not to limit attribute assignment. Slots are useful to define types that have a smaller memory footprint than types.
You are getting the expected behavior. Enum parent class does not have __slots__ and therefore automatically has a __dict__. You could make an argument to add __slots__ to Enum, but that would be a new feature for 3.11. |
|
Date |
User |
Action |
Args |
2021-12-19 22:57:17 | christian.heimes | set | recipients:
+ christian.heimes, ethan.furman, AlexWaygood |
2021-12-19 22:57:17 | christian.heimes | set | messageid: <1639954637.03.0.671463781046.issue46132@roundup.psfhosted.org> |
2021-12-19 22:57:17 | christian.heimes | link | issue46132 messages |
2021-12-19 22:57:16 | christian.heimes | create | |
|