python syntax for conditional is unfortunate

namekuseijin namekuseijin at
Wed Sep 24 03:49:38 CEST 2008

On 23 set, 20:52, Neal Becker <ndbeck... at> wrote:
> In hindsight, I am disappointed with the choice of conditional syntax.  I know it's too late to change.  The problem is
> y = some thing or other if x else something_else
> When scanning this my eye tends to see the first phrase and only later notice that it's conditioned on x (or maybe not notice at all!).  Particularly if 'some thing or other' is long or complicated.

Yes, infix syntax sucks.  No ambiguities in prefixed Lisp:  (if x (or
something other) something_else)

Anyway, pretty amusing seeing Guido nodding to Larry... ;)

More information about the Python-list mailing list