The "right" way to use config files

Terry Reedy tjreedy at udel.edu
Sat Aug 9 13:29:59 EDT 2014


On 8/9/2014 7:48 AM, Fabien wrote:

> BUT, my "problem" is that several options really are "universal" options
> to the program, such as the output directory for example. This
> information (where to write their results) is given to most of the
> functions as parameter.

If possible, functions should *return* their results, or yield their 
results in chunks (as generators). Let the driver function decide where 
to put results.  Aside from separating concerns, this makes testing much 
easier.

-- 
Terry Jan Reedy




More information about the Python-list mailing list