Charles-François Natali added the comment: > But no, nothing in the python Enum implementation restricts it to a value > *range*. It is really a collection of named constants.
I didn't say in the implementation, I said in spirit. Would you describe all possible Unix PIDs are a Enum? Also, the problem is that many such constant can have identical values (because they can be passed at different syscalls/argument offset), and in this case the IntEnum equality isn't wanted: cf@neobox:~/python/hg/default$ cat /tmp/test.py from enum import IntEnum class Const(IntEnum): AF_INET = 1 SO_REUSEADDR = 1 print(Const.AF_INET == Const.SO_REUSEADDR) cf@neobox:~/python/hg/default$ ./python /tmp/test.py True Really? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21406> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com