Jacob Kruger <
[email protected]> wrote or quoted:
from scoping2 import *
Now, "dt_expiry" exists in /two/ modules: In "scoping2" and in the
current module (as a copy). To avoid this, "import scoping2" instead.
print(dt_expiry)
1970-01-01 00:00:00+00:00
do_it()
2024-03-06 18:12
This changes the variable "dt_expiry" in "scoping2", but not the
copy (also named "dt_expiry") in the current module.
print(dt_expiry)
1970-01-01 00:00:00+00:00
This prints "dt_expiry" from the current module, not from "scoping2".
To avoid this, replace "from scoping2 import *" by "import scoping2"
and replace the "dt_expiry" in the two print statements by
"scoping2.dt_expiry".
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)