Ethan Furman <et...@stoneleaf.us> added the comment:

Immediate solution is to raise an exception if `_generate_next_value_` is 
defined after members.

Possible future solution is to save all member definitions until after class is 
defined.

The exception-raising solution would require a check in `_EnumDict` where 
`_generate_next_value_` is saved -- if any members already exist, raise.

----------
assignee: docs@python -> ethan.furman
keywords: +easy
stage:  -> needs patch
versions: +Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40025>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to