Accessing variables created after import in imported files
Fredrik Lundh
fredrik at effbot.org
Mon Jan 1 14:38:29 EST 2001
Jesse W wrote:
> Thank you. If I seperate the executing code from the definitions, it
> works. But what is a mutual dependency, and why should that cause a
> class to not appear when it is first imported?
Python *executes* module code to fill in the module name-
space. if you do recursive imports, you may end up trying
to access objects that hasn't been created yet.
for more info, see the section "What Does Python Do to
Import a Module" in
http://effbot.org/guides/import-confusion.htm
</F>
More information about the Python-list
mailing list