Leam Hall wrote:

> I'm building a program that uses one of my own modules for a bunch of
> formula defs and another module for the tkinter GUI stuff. There are
> half a dozen input variables and about the same in calculated variables.
> Is it better/cleaner to just build a global dict and have everything go
> into it or pass multiple arguments to each function and have it return
> the calculated value?

The latter. It makes the dependencies explicit to a reader of the function, 
it simplifies unit tests, allows it to reuse functions in a different 
context, and it is more likely to work in a multi-threaded environment.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to