Message45923
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:37:35 | admin | link | issue946373 messages |
2007-08-23 15:37:35 | admin | create | |
|