In article <mailman.114.1066216686.2192.python-list at python.org>, Gerrit Holl <gerrit at nl.linux.org> wrote: > > Since Python lacks conditional expression > > > > like > > > > k+= (dy >= 0 ? 1 : -1) k += 2*(dy >= 0) - 1 -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science