[Tutor] Fwd: syntax question

Kent Johnson kent37 at tds.net
Fri May 23 20:38:36 CEST 2008


On Fri, May 23, 2008 at 2:25 PM, Moishy Gluck <moishyyehuda at gmail.com> wrote:
> I came in python around 2.5. So I've been using "Boolean and 1 or 2".

For Python 2.5 you should use the new syntax
  1 if Boolean or 2

It doesn't have the problems of the unofficial syntax you quote.

Kent


More information about the Tutor mailing list