[Python-ideas] Revisiting dedicated overloadable boolean operators

Grégory Lielens gregory.lielens at gmail.com
Tue Aug 7 00:38:57 EDT 2018


A small remark for Todd's proposal: I think you should treat the new not (bNOT in the original proposal) differently: it's not binary, so it should not have 2 dunders, the right one is not needed (or there is only the right one, in a way, but other unary ops use the classic dunder iirc...)

Also, not having xor is made more painful by this proposal (or for any proposal for new Boolean operators using variants of and/or/not)...
I have been bitten a few times writing xor in my code (not often, because xor is done less often), it already feel like it's missing from python. With additional duplicated operators, including bXOR, the missing xor is annoying like a missing teeth: even if you don't use it so much, you think of it all the time ;-)
Greg.


More information about the Python-ideas mailing list