The official doc explains that :

Python evaluates expressions from left to right.

cf. https://docs.python.org/3.3/reference/expressions.html#evaluation-order


But consider the following snippet :


>>> t=[2020, 42, 2015]
>>> t*(1+int(bool(t.sort())))
[42, 2015, 2020]
>>>


Is there not some contradiction with left-right evalutation? 





-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to