"... main_func calls sub_func1 and after that sub_func2, which are in other modules"
Why?
If you consider the parameters of "better" to include 'how many times' the solution opens and closes your data file and 'how many modules' you have to load, I submit that refactoring all the scripts using main_funct, sub_func1, sub_func2 and whatever the "add something" may be, so you end up with a single module... at which point your other alternatives become moot.
In reply to Re: Design/Style question about writing to a file from different functions
by ww
in thread Design/Style question about writing to a file from different functions
by Dirk80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |