Python 中的评估顺序

Order of Evaluation in Python

k = 10 / 3
l = k <= 3 or True

此代码中 l 的值 returns 正确。这怎么可能?在评估顺序中,比较的优先级高于 "or, not, and" 运算符。

他们确实有更高的优先级,但是,or operator works by:

The expression x or y first evaluates x; if x is true, its value is returned; otherwise, y is evaluated and the resulting value is returned.

由于 k3.3333333333333335,表达式 k <= 3FalseTrue 将被评估(对自身)并返回使得 l == True.