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/2010-December/106212.html below:

[Python-Dev] python3k : imp.find_module raises SyntaxError

[Python-Dev] python3k : imp.find_module raises SyntaxErrorNick Coghlan ncoghlan at gmail.com
Wed Dec 1 02:19:52 CET 2010
On Wed, Dec 1, 2010 at 8:48 AM, Ron Adam <rrr at ronadam.com> wrote:
> * It almost seems like the concept of a sub-module (in a package) is flawed.
>  I'm not sure I can explain what causes me to feel that way at the moment
> though.

It isn't flawed, it is just a *lot* more complicated than most people
realise (cf. PEP 302).

In this case, the signature of find_module (returning an already open
file) is unfortunate, but probably necessary given the way the import
internals currently work. As Brett says, returning a loader would be
preferable, but the builtin import machinery doesn't have proper
loaders defined (and won't until we manage to get to the point where
importlib *is* the import machinery).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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