Why aren't “and” and “or” operators in Python?

前端 未结 6 591
陌清茗
陌清茗 2021-02-07 00:32

I wasn\'t aware of this, but apparently the and and or keywords aren\'t operators. They don\'t appear in the list of python operators. Just out of sh

6条回答
  •  闹比i
    闹比i (楼主)
    2021-02-07 01:08

    They can't be redefined to support type-specific operations, so they don't fall under the scope of the other operators.

提交回复
热议问题