Using something other than ';' to separate statements
Ivan Van Laningham
ivanlan at pauahtun.org
Wed Mar 30 15:39:22 EST 2005
Hi All--
Michael Hoffman wrote:
>
> Jaime Wyant wrote:
>
> > # This won't work
> > if a > 5: print "a > 5";else print "Doh"
>
> This will:
>
> ["Doh", "a > 5"][a > 5]
>
> I highly discourage using it though--it's somewhat obtuse.
>
Bad Michael. Bad, bad Michael.
Metta,
Ivan
----------------------------------------------
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours
More information about the Python-list
mailing list