[Tutor] RE: global vars vs. func args
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Mon, 11 Mar 2002 19:05:06 -0800 (PST)
On Mon, 11 Mar 2002, Scott Widney wrote:
> In Python, when you DEFine a function, you're creating a name and
> associating that name with a function object. Python is relaxed. You
> can choose to return a value or not.
>
> > Is this still legitimate coding practice in Python? The QPB
> > is a bit dated, but this seems like valid use of functions.
>
> Sure...use whatever you know now in whatever way is appropriate to
> getting the task completed.
>
> "Everything is permissible, but not all things are beneficial."
>
> You can always refactor it, if it's going to be around for a while.
>
> "The best thing about knowing the rules is knowing when to break
> them."
I might as well toss out a few more relevant and funny quotes from Alan
Perlis:
###
"""If you have a procedure with ten parameters, you probably missed
some."""
"""Think of all the psychic energy expended in seeking a fundamental
distinction between "algorithm" and "program"."""
"""Interfaces keep things tidy, but don't accelerate growth: Functions
do."""
###
http://www.cs.yale.edu/homes/perlis-alan/quotes.html
*grin*