Enum with nested classes or with types as members

Ben Finney ben+python at benfinney.id.au
Wed Sep 12 06:27:32 EDT 2018


Ethan Furman <ethan at stoneleaf.us> writes:

> I'm asking because in doing some work on Enum it became apparent to me
> that having nested classes was not a smooth, satisfying experience,
> and I'm considering treating them the same way as methods (they will
> no longer be converted into members).

For reference (and to hopefully better inform this discussion) the topic,
of Enum subclasses with nested class attributes, was raised recently
<URL:https://mail.python.org/pipermail/python-list/2018-June/735128.html>
by Ethan, and several conflicting positions were aired back then.

> So if you use that functionality, tell me now!  :)

Thanks for keeping this going, I hope a consensus can emerge.

-- 
 \       “If we listen only to those who are like us, we will squander |
  `\   the great opportunity before us: To live together peacefully in |
_o__)            a world of unresolved differences.” —David Weinberger |
Ben Finney




More information about the Python-list mailing list