Conditional operator in Python?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sun Apr 1 09:39:34 EDT 2001


01 Apr 2001 13:58:35 +0100, Michael Hudson <mwh21 at cam.ac.uk> pisze:

> > >     (x and [a] or [b])[0]
> > 
> > It computes both a and b.
> 
> No it doesn't:

Oops, of course, stupid me.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list