John Belmonte <[email protected]> added the comment:
I agree that a bit and one-bit flag are the same.
> only 'x' was in 'xyz', not 'xy
I don't understand the comparison, because str 'a in b' tests if 'a' is a
subsequence of 'b'. It is not a subset operation ('xz' in 'xyz' is false).
I can understand the argument that Flag has a subset operator (currently
__contains__), and given that one-bit flags can be used freely with the subset
operator, there is no reason to add a bit membership operator.
However, since flag values are arguably a set of enabled bits, I think the use
of `in` for subset is a confusing departure from the `set` API.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38250>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com