[Edu-sig] Python First: Free access for educators

kirby urner kirby.urner at gmail.com
Wed Mar 8 19:34:39 CET 2006


> should we really be showing folks using a mutable object as a default
> argument? ;-)
>

That was purely pathological on my part -- I was writing quirky "get
the idea across" code, not "put this in a text book and publish it"
code.

> i'd suggest: (1) changing it to a tuple, or (2) None and figure it out
> after that.

Might not be a function at all, just embedded code, since you often
don't need but one or two switch statements if any.  Just some
embedded try-except syntax might suffice.

I tend not to use them much (switches), in part because I don't write
1970s-style via-menu i/o loops so much as just import the tools I need
from a namespace and use them directly, i.e. the "switch" statement is
behind my eyes (one might say)).  That's how I expect others to use my
modules as well -- no "switch" need apply.

> cheers,
> -wesley

Kirby


More information about the Edu-sig mailing list