Author Dutcho
Recipients Dutcho, barry, eli.bendersky, ethan.furman
Date 2018-04-03.21:36:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Fully agree that Flag.__contains__ must RETURN False or True; that's why I suggested it RAISES TypeError
The exception was to be consistent with e.g. Flag.__and__, which by returning NotImplemented transfers to type(other).__rand__, and assuming __rand__ cannot handle Flag and also returns NotImplemented, falls back to the interpreter raising TypeError. Also e.g. 1 in 'hello' raises TypeError.
For Flag, I wouldn't strongly oppose to False for other being a different type. However, classes derived from Flag could face issues, e.g. `class MyIntFlag (Flag, int): pass`.
Date User Action Args
2018-04-03 21:36:22Dutchosetrecipients: + Dutcho, barry, eli.bendersky, ethan.furman
2018-04-03 21:36:22Dutchosetmessageid: <>
2018-04-03 21:36:22Dutcholinkissue33217 messages
2018-04-03 21:36:22Dutchocreate