How to make a variable's late binding crosses the module boundary?

Eryk Sun eryksun at gmail.com
Thu Sep 1 12:41:21 EDT 2022


On 8/31/22, Jach Feng <jfong at ms4.hinet.net> wrote:
>
> I found that using "from test import *" in test2.py makes test2's relation
> to "test" almost like the function's relation to the module where it is
> defined. You can refer to all the variables of the module

Note that in general, if __all__ doesn't exist to explicitly define
the contents of a star import, then it imports everything except names
that begin with an underscore.


More information about the Python-list mailing list