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/106217.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 08:41:07 CET 2010
On Wed, Dec 1, 2010 at 3:59 PM, Ron Adam <rrr at ronadam.com> wrote:
> Yes, it's realising that it is a *lot* more *complicated*, that gets me.
> Flawed isn't the right word, it's rather a feeling things could have been
> simpler if perhaps some things were done differently.

*That* feeling I can understand. The import system has steadily
acquired features over time, with each addition constrained by
backwards compatibility concerns with all the past additions,
including the exotic hacks people were using to fake features that
were added more cleanly later.

For the directory-as-module-not-package idea, you could probably
implement a PEP 302 importer/loader that did that (independent of the
stdlib). It would have the advantage of avoiding a lot of the pickle
compatibility problems that a "flat package" like the new unittest
layout can cause. However, you would need to be very careful with it,
since all the files would be sharing a common globals() namespace.

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