[Python-Dev] Looking for authoritative documentation on packages, import & ihooks

Tim Peters tim.peters at gmail.com
Tue Nov 16 20:45:24 CET 2004


[Carlos Ribeiro]
...
>> For this reason, I would like to know if there is any document which may
>> be considered "authoritative" for the import system (besides ihooks.py
>> and import.c).

[Martin v. Löwis]
> This question is OT for python-dev.
>
> Python is open source, so what is wrong with reading import.c?

I've tried.  I usually stop when the pool of blood from my eyeballs
rises above my ankles <0.9 wink>.

I'm not sure this is OT for python-dev.  There are many cases
involving circular and kinda-circular imports, with and without
packages, where the Python docs say nothing about what must, should,
or can happen.  So we still get bug reports like this recent one,
where nobody has a definitive answer:

    http://www.python.org/sf/992389

That case doesn't involve import hooks, just the meaning of package
imports and what you can and can't "get away with" in __init__.py
files.  In the presence of user-defined import hooks too, reaching the
clarity of mud in this case would be a noteworthy accomplishment.


More information about the Python-Dev mailing list