[issue46132] Attempting to create an enum with slots silently fails

2021-12-19 Thread Christian Heimes
Christian Heimes 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

[issue46132] Attempting to create an enum with slots silently fails

2021-12-19 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46132] Attempting to create an enum with slots silently fails

2021-12-19 Thread Alex Waygood
New submission from Alex Waygood : Attempting to create an enum with __slots__ silently fails. No error is raised if __slots__ are specified, but the usual behaviour of __slots__ does not work as expected. Attributes that are not specified in __slots__ can be freely set: >>> from enum