[Python-ideas] IntFlags

random832 at fastmail.us random832 at fastmail.us
Mon Mar 9 14:49:35 CET 2015


On Sun, Mar 8, 2015, at 05:45, Neil Girdhar wrote:
> If flags were conceptually subtypes of int, then you should be able to do
> things like:
> 
> flags ** 7
> 
> or
> 
> flags // 91

*cough* bool *cough*

> 
> Do you agree that this is totally meaningless?  There is no "is a"
> relationship between Flags and int.  There is a conversion between the
> conceptual mapping that is a Flags object to int for the sole purpose of
> calling into APIs.


More information about the Python-ideas mailing list