Alex Waygood <alex.wayg...@gmail.com> added the comment:
It would be difficult to define methods in Enum classes if functions in the class namespace were automatically converted into members. You can get around this by wrapping your functions in `functools.partial` objects; see https://stackoverflow.com/questions/40338652/how-to-define-enum-values-that-are-functions. ---------- nosy: +AlexWaygood, ethan.furman _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45657> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com