A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-July/015786.html below:

[Python-Dev] Q: import logic

[Python-Dev] Q: import logic [Python-Dev] Q: import logicSamuele Pedroni Samuele Pedroni <pedroni@inf.ethz.ch>
Fri, 6 Jul 2001 17:22:58 +0200 (MET DST)
Hi. I have looked at CPython import logic (C code) ...

is the following true (ignoring relative import issues and None markers):

trying to import s.p.a.m the logic checks for:

s.p.a.m
s.p.a
s.p
s

in sys.modules in this order until it finds an already present module and starts the effective
loading from there.

Is that an implementation detail, or should be considered an important semantic aspect.

Jython has a different logic but then some tricky python code (substituing packages with classes)
can incur in inf recursion.

Thanks, Samuele Pedroni.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4