Thank you for reminding me of that! I've just started with 2.5 but that one had slipped my memory and I've still been using
X = (z and [y] or [w])[0] Thank! Jeff -----Original Message----- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, August 10, 2007 10:23 AM To: Smith, Jeff Cc: tutor@python.org Subject: Re: [Tutor] Losing the expressiveness ofC'sfor-statement?/RESENDwith example Smith, Jeff wrote: > P.S. This should in no way be construed as undercutting my belief that > Python should have a case statement, a ternary operator, and > full-fledged lambdas Python 2.5 does have conditional expressions that do the work of a ternary operator: x = y if z else w http://docs.python.org/whatsnew/pep-308.html Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor