On 5/13/2013 7:36 PM, Ethan Furman wrote:
2) Is something like demo2 interesting to anyone but me? Of course, I
think it would be great for reporting flag values
using names rather than a number representing combined bit fields.
No idea. ;)
There's been some talk of Enum-ing constants in the Socket library...
I'm no socket programmer, so I'd have to go read the APIs to know if any
of them are for bitfields which are typically combined together with |
or + being the typical operators... and which would convert them to
plain integers, and lose the reporting by name. That's the problem I
see with IntEnum used for bitfields.
For simple selection of choices, one choice per parameter, Enum will be
great. But for bitfields, it is lacking.
Sorry if this sounds repetitious, but all the other times I've mentioned
it, it has been in a big discussion of other stuff too.
Glenn
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com