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 
re.compile <https://docs.python.org/3/library/re.html#re.compile>function. 
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 
interoperability detail?

Comments please, (And a happy new year to you :-)

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to