else on the same line - howto

Emile van Sebille emile at fenx.com
Wed Oct 15 10:51:24 EDT 2003


"Terry Reedy"

> For this specific example:
>
> k+= (dy >= 0 and 1 or -1)

or even:

k+=(dy>=0 or -1)

(lame-truly-unique-blurb-here... ;-)
--
Emile van Sebille
emile at fenx.com






More information about the Python-list mailing list