Christian Heimes <li...@cheimes.de> added the comment:
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. ---------- nosy: +christian.heimes _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46132> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com