[Python-Dev] Re: [Import-sig] Re: Proposal for a modified import
Mon, 12 Nov 2001 11:33:19 -0500 (EST)
>>>>> "PR" == Prabhu Ramachandran <firstname.lastname@example.org> writes:
PR> Ummm doing an 'import os' will import the package1/os.py and
PR> *not* the standard one. This will happen even though os.py was
PR> imported earlier by site.py. This is what Gordon was objecting
PR> to in the first place and why he proposes using rimport,
PR> rrimport etc. to make things more explicit.
Of course, you can use the existing mechanism to do this: 'from
package1 import os'. The use of an explicit name seems like the
clearest route when you have a package-local module that shadows a
top-level module -- no need to understand details of relative imports,
no question about what is intended by the code.
I haven't followed this thread closely. Is there some reason that
explicit names in imports is not sufficient?