This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients barry, eli.bendersky, ethan.furman, neologix, pitrou, r.david.murray
Date 2014-05-01.19:42:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM0CA0Bi60kC7dOkb+S5g+PamJ4_LdJapY2aO0zdxq9VHQ@mail.gmail.com>
In-reply-to <1398972445.57.0.239950356515.issue21406@psf.upfronthosting.co.za>
Content
> 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?
History
Date User Action Args
2014-05-01 19:42:06neologixsetrecipients: + neologix, barry, pitrou, r.david.murray, eli.bendersky, ethan.furman
2014-05-01 19:42:06neologixlinkissue21406 messages
2014-05-01 19:42:06neologixcreate