[Tutor] running a script from IDLE
Erik Price
erikprice@mac.com
Fri, 8 Mar 2002 07:42:58 -0500
On Thursday, March 7, 2002, at 01:31 PM, Kirby Urner wrote:
> I find this a good way to use IDLE because you can build
> up your modules by "unit testing" each piece (each
> function or class) as an individual unit. This tends to
> promote good habits, as your units have more standalone
> integrity if they have to bear up as testable, versus
> relying on global variables or side effects smeared all
> over the place.
So instead of global variables, it's good form for functions to simply
use arguments and act upon those? If this is what you're saying, I can
see that, since it makes the code more reuseable in scripts that don't
provide these same [global] variables.
Isn't using a globalized varible just a way to save time/space by not
having to declare it as an argument?
Always curious about good style,
Erik