homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients brett.cannon, eric.snow, nadeem.vawda, ncoghlan, pitrou, skrah
Date 2012年02月25日.18:35:39
SpamBayes Score 8.548775e-07
Marked as misclassified No
Message-id <20120225183538.GA26857@sleipnir.bytereef.org>
In-reply-to <1330189417.3400.4.camel@localhost.localdomain>
Content
What happens is that if self._fill_cache() is called, cache_module='pep3147'
and cache={'pep3147'}. Then 'cache_module in cache' is true and the function
returns:
 loader('pep3147', './pep3147/__init__.py')
Otherwise, find_module() returns None, control is handed back to
find_module_path() ...
 loader = _PyObject_CallMethodId(importer, &PyId_find_module, "O", fullname)
... and then to find_module_path_list(), where the search continues:
 for (i = 0; i < npath; i++) {
 path = PyList_GetItem(search_path_list, i);
 ...
search_path_list = ['.', '', ... ], but now i==1, so the dot is disregarded
and '' is used as the path, leading to the dotless result.
I don't know the contract for importlib's find_module, but it seems to me
that either find_module should handle this case or we have an unwanted
interaction between C and Python code.
History
Date User Action Args
2012年02月25日 18:35:40skrahsetrecipients: + skrah, brett.cannon, ncoghlan, pitrou, nadeem.vawda, eric.snow
2012年02月25日 18:35:39skrahlinkissue14080 messages
2012年02月25日 18:35:39skrahcreate

AltStyle によって変換されたページ (->オリジナル) /