[Python-ideas] Should nested classes in an Enum be Enum members?
levkivskyi at gmail.com
Sun Jul 1 09:03:33 EDT 2018
Replying to the list this time.
On 27 June 2018 at 15:46, Ethan Furman <ethan at stoneleaf.us> wrote:
> So I'm asking the community: What real-world examples can you offer for
> either behavior? Cases where nested classes should be enum members, and
> cases where nested classes should not be members.
I wanted few times to make an enum of enums. For example:
Powell = 1
Newton_CG = 2
Constr = 3
Exact = 4
So that one can write:
minimize(..., method=Method.Trust.Exact) # this currently fails
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas