Import semantics?

Ian Kelly ian.g.kelly at
Sat Jun 9 00:48:17 CEST 2012

On Fri, Jun 8, 2012 at 4:24 PM, Dan Stromberg <drsalists at> wrote:
> Am I misinterpreting this?  It seems like according to the PEP, I should
> have still been able to import despite having a treap/.  But I
> couldn't; I had to rename treap/ to treap-dir/ first.

That's how I understand it.  The existence of a module or regular
package 'foo' anywhere in the path should trump the creation of a
'foo' namespace package, even if the namespace package would be
earlier in the path.  Ar you sure you don't have an in
your treap directory?

More information about the Python-list mailing list