[Python-ideas] a set of enum.Enum values rather than the construction of bit-sets as the "norm"?
paddy3118 at gmail.com
Tue Dec 26 15:07:52 EST 2017
Maybe it is time to deemphasize the creation and passing of what is, in
effect, bit-sets <https://en.wikipedia.org/wiki/Bit_array>as a single
argument, and instead promote the passing of a set of members of an
enum.Enum <https://docs.python.org/3/library/enum.html> constants.
Thi comes about because someone wrote a description, (since deleted), of
constructing bit-sets to use in passing flags to, for example, the
The use of individual bits in a bit-array/bit-set to pass multiple flags is
an implementation detail. Should we not *first *teach the passing of a set
of enum.Enum constant values in one argument as the *pythonic *way; and
leave bit-sets and other types of enum's as a performance or
Comments please, (And a happy new year to you :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas