如何使用魔术方法重写逻辑AND运算符?

时间:2020-01-31 19:17:52

标签: python python-3.x

在python中,可以使用魔术方法HELLO WORLD! |覆盖按位OR运算符&和按位AND运算符__or__(self, other)

是否有任何方法可以覆盖逻辑AND运算符__and__(self, other)和逻辑OR运算符and? (即在orTrue and False中)

0 个答案:

没有答案