Module Conflicts

Terry Reedy tjreedy at
Thu Apr 10 22:07:01 CEST 2008

"Jose" <jfgomez21 at> wrote in message 
news:b7ed8b5e-91fa-4495-b4e3-4912be9e8d90 at
| On Apr 9, 10:36 pm, Benjamin <musiccomposit... at> wrote:
| > On Apr 9, 5:33 pm, Jose <jfgome... at> wrote:
| >
| > > I have a module named in a package with some class
| > > definitions.  I am trying to import the standard python math module
| > > inside of but It seems to be importing itself.  Is there any
| > > way around this problem without renaming my file?
| >
| > Not without some unpythonic magic. It's really not good style to name
| > a module the same as a stdlib one. It'll also confuse people reading
| > your code.
| Yeah but I thought since was in a package, it would be okay.

The stdlib contains a few packages, but it is not a package in itself.
So math is not in a package. 

More information about the Python-list mailing list