[Python-Dev] Re: [Import-sig] Re: Proposal for a modified import mechanism.
Toby Dickenson
tdickenson at devmail.geminidataloggers.co.uk
Tue Nov 13 08:06:09 EST 2001
Jeremy Hylton <jeremy at zope.com> wrote:
>I'd rather see the imports be explicit "import root.a.b.c" than
>"import b.c". Then re-nesting requires all the import statements to
>be edited. It's more typing and might even require a simple script to
>do search-and-replace, but it doesn't sound like a prohibitive
>burden.
A complementary problem that I havent seen mentioned in this thread
(my appologies if I have missed it) relates to sibling modules in a
package. Currently python will search for sibling modules ahead of the
standard library; one of my projects broke the unicode support in
python 2.0 because it had a codecs.py.
today a module a.b.c can import a sibling module a.b.c2. using a
simple "import c2". I would be happy to allow an explicit "import
local.d" in this case.
Toby Dickenson
tdickenson at geminidataloggers.com
More information about the Python-list
mailing list