On Wed, Dec 1, 2010 at 3:59 PM, Ron Adam <r...@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   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to