package module import name clash with global package

Alex Martelli aleaxit at yahoo.com
Fri Sep 10 18:17:27 EDT 2004


George P <georgeplex at yahoo.com> wrote:
   ...
>    a) Not use os as my submodule name

Best.

> a) is not a perfect solution because, well, in my example I've used
> "os" to illustrate the problem, but really, who's to predict what
> global modules might be installed on a system? And besides, isn't this

As long as your package does not use global modulenames coinciding with
the ones it contains, you're fine.  You don't need to predict anything:
if your package needs global modules os, sys, and re, don't have modules
named that way in your package.  Simple, innit?


Alex



More information about the Python-list mailing list