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 josiahcarlson
Recipients
Date 2005-02-23.17:02:44
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=341410

I'm sorry, the bit I quoted shouldn't go into your email.py
file, it should go into the module that wants to import
Python's email package, and not your email.py module (my
brain was fuzzy on the  16th).

Standard library name masking is exactly what the absolute
imports PEP was seeking to fix.  You use "from __future__
import absolute_imports", and from then on, you can do
relative imports via "import .modulename" (note the leading
period), and stdlib imports via "import modulename" (note
the lack of a leading period).  It also allows you to go
higher up in paths via additional leading periods.

This /does/ in fact fix the problem mentioned, at the cost
of having to change the import lines because of the changed
import semantic.  This allows users to choose names that
they desire, even if it mirrors a standard library module name.

It also doesn't require any patches.
History
Date User Action Args
2007-08-23 15:37:35adminlinkissue946373 messages
2007-08-23 15:37:35admincreate