[Python-ideas] IntFlags
random832 at fastmail.us
random832 at fastmail.us
Wed Mar 4 20:54:43 CET 2015
On Wed, Mar 4, 2015, at 13:37, Alexander Heger wrote:
> I don't see your point. With colours it would be exactly the same:
>
> red | blue == magenta
>
> and for your example:
>
> cyan | blue = cyan
>
> As with the later discussion on file flags, cyan is just a combination
> flag for green and blue.
I think it was a badly chosen example - someone easily _could_ have a
color enum that doesn't have these properties. Definitely there are
enums that it doesn't make sense to combine together with bitwise ops.
More information about the Python-ideas
mailing list