On Thu, Jun 28, 2018 at 06:57:45AM +0300, Serhiy Storchaka wrote:
> Making a nested class a member you
> don't lost anything, because you always can make it not-nested if you
> don't want it be a member.
You lose the ability to have
Colors.RED.NestedClass() # returns something useful
# similar to Colors.RED.method()
for the (dubious?) advantage of having
Colors.NestedClass
treated as a colour enum.
> But when a nested class is not a member, you
> would lost the possibility of making it a member (and this may break
> existing code).
I must admit I'm still perplexed why I might want NestedClass to be an
enum member.
--
Steve
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/