Alex Waygood <alex.wayg...@gmail.com> added the comment: Ah, of course, I'm an idiot — I forgot that a class could not prevent the creation of __dict__ unless the parent class also had __slots__. Thanks, Christian.
In which case: consider this a feature request to consider adding __slots__ to enum.Enum: for faster attribute access, lower memory footprint, and the ability to define __slots__ in custom Enum classes. ---------- title: Attempting to create an enum with slots silently fails -> Consider adding __slots__ to enums? type: behavior -> enhancement versions: -Python 3.10, Python 3.9 _______________________________________ 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