On Thu, 26 Mar 2020, Schachner, Joseph wrote:

I can only tell you my preference. I prefer that Python modules be as
self-contained as possible, because "global" is within a module; to share
between modules you have to import something, as you know.

Joseph,

This makes good sense. I don't know that I'll end up with a chain of
namespaces, but I should avoid that possiility.

If I understand your reasoning, within commonDlg.py I should import required
modules for each class and not all of them at the beginning of the file. And
each module that uses classes from commonDlgs should include 'from commonDlg
import ...' only the classes it needs, even when there are several (but not
all commonDlg classes).

Is this correct?

Many thanks,

Rich

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to