On Tue, Jun 9, 2009 at 8:31 AM, Lie Ryan <lie.1...@gmail.com> wrote:

>
> Maybe python should issue some kind of warning when a module being
> imported from a local path has the same name as an installed module? It
> is never a good idea to name a module the same as an installed library
> unless you're deliberately trying to shadow the library for some reason
> (in which case you're a fully consenting adult).
>
>
so I guess it would search the library, then local path, and warn and import
if it finds from the local path?

That's one thing that would be useful to borrow from C(?)/C++ - if you
import <somelib> then it only looks in the standard location. If you import
"somelib" then it looks in the local path and if it's not found it looks in
the standard location. I think there's some other syntax that only looks for
the library locally, too.

I wonder what the BDFL would/has said.

/me wanders off to see what he can find...
-Wayne

-- 
To be considered stupid and to be told so is more painful than being called
gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness,
every vice, has found its defenders, its rhetoric, its ennoblement and
exaltation, but stupidity hasn’t. - Primo Levi
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to