On 9/11/21 7:29 pm, Ethan Furman wrote:
I've had a couple people tell me that they think of flags as sets, and use set theory / set behavior to understand how flags and groups of flags should interact.
If you're going to think of flags as sets, then 'i in flags' should be equivalent to '((1 << i) & flags) != 0'. -- Greg _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/43SHTKMYRYSRK6P2DPG4XVZMRPOSB42E/ Code of Conduct: http://python.org/psf/codeofconduct/