ternary operator vote

Robin Becker robin at jessikat.fsnet.co.uk
Tue Feb 11 20:10:44 CET 2003


.... is there any general convention about order of evaluation in
Python? If we are lexical left right, top down ordered then

1)      x if C else y

will have very different meanings to
2)      if C: x else: y

It seems reasonable that C should be evaluated before either x or y so
that in the left right top down world 1) looks wrong. 
-- 
Robin Becker




More information about the Python-list mailing list