I am new to python. I have a few questions coming from an armature!

Marko Rauhamaa marko at pacujo.net
Wed Aug 17 15:50:43 EDT 2016


MRAB <python at mrabarnett.plus.com>:

> On 2016-08-17 19:39, Random832 wrote:
>> Why not just if(cond, trueval, falseval), a la Visual Basic?
>
> Well, it looks too much like a function call, which don't
> short-circuit.

Well, in Scheme, everything looks like a function call:

    (define (deflate x)
      (if (> 0 x)
          (1+ x)
          (1- x)))


Marko



More information about the Python-list mailing list