in reply to Design/Style question about writing to a file from different functions
"... 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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Design/Style question about writing to a file from different functions
by Dirk80 (Pilgrim) on Jul 20, 2010 at 19:31 UTC | |
by BrowserUk (Patriarch) on Jul 20, 2010 at 21:50 UTC | |
by AndyZaft (Hermit) on Jul 20, 2010 at 20:31 UTC |