John Hagen added the comment:
Raymond, thanks for your consideration and input.
I'll work on a small patch unless I hear from Ethan that he'd rather do it.
I'm happy to defer to his expertise.
I did try out None as a value just to be sure that that didn't work as it would
not be a bad alternative. But since the values are "equal", Enum tries to
alias them.
import enum
@enum.unique
class Color(enum.Enum):
red = None
green = None
blue = None
>>> ValueError: duplicate values found in <enum 'Color'>: green -> red, blue ->
>>> red
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue27877>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com