A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-October/083133.html below:

[Python-Dev] is the 'path' argument to an importer's find_module() just a hint?

[Python-Dev] is the 'path' argument to an importer's find_module() just a hint? [Python-Dev] is the 'path' argument to an importer's find_module() just a hint?Brett Cannon brett at python.org
Mon Oct 27 04:13:49 CET 2008
I just discovered frozen packages set their __path__ simply to their
name and not to a list as expected (http://bugs.python.org/issue4211).
This made me think about the 'path' argument to find_module() and
whether it can be treated as simply a hint or should always be
seriously looked at.

Take frozen modules, for instance. If the 'path' argument is meant to
always be considered then if a frozen module is within a package a
check should be done to make sure that the parent package is in 'path'
somewhere. But if it is simply a hint, then 'path' should be ignored
and whether the module can be found should depend fully on
imp.is_frozen().

So, what do people think? Should 'path' for find_module() always be
taken into consideration, or only when it happens to be convenient?

-Brett
More information about the Python-Dev mailing list

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