[Edu-sig] Pythonic "case statement"

kirby urner kirby.urner at gmail.com
Thu Jun 15 02:55:05 CEST 2006


> But note how you can clump all this multi-line output in just one
> print statement.  I've seen some newbies go print, print, print all
> the way down the right side, avoiding this elegant solution.
>

...left side...

Note to edu-sig readers:

I'd like ya'll to meet Bernie Gunn.  We've been sharing some geneology
lately, keying off my Swiss name (Urner).  Our family escaped (I
suppose -- Church of the Brethren), pre 1776, to what would someday
become The Federation of States we call the United States even today
(it almost fell apart a few times).  Bernie's family, based in New
Zealand, can trace some similar roots, though to a different Kanton
(ours, Uri, contains Altdorf).

Bernie is a geochemist with a lot of Pascal experience, but nowadays
he's thinking of the future and wanting to use a more modern language.
 His shop is experimenting with Python, but not exclusively.  Java is
also getting a workout.

Anyway, I've got a couple posts mentioning Bernie in my blog, if you
want some more background:

http://worldgame.blogspot.com/2006/05/coffee-shop-physics.html
http://worldgame.blogspot.com/2004/12/view-from-middle-earth.html

Kirby


More information about the Edu-sig mailing list