On 14/11/2022 17:14, Stephen Tucker wrote:
Hi,
I have two related issues I'd like comments on.
Issue 1 - Global Values
Your "global variables" module acts exactly as a singleton class. Funny,
you could (and maybe you do) write in your functions
import global_vars_module as self
as the first step of refactoring.
From personal experience, when I worked at work we used modules for
globals as well, but over time such an approach looked more and more
ugly and finally was rejected.
Issue 2 - Passed Parameters
I am now facing another situation where I am wanting to pass 6 or 7
parameters down through several layers of logic (function A calling
function B calling ... ) and for results to be passed back.
Nothing fancy here, we used dicts for args and results.
Axy.
--
https://mail.python.org/mailman/listinfo/python-list