Import semantics?
Ian Kelly
ian.g.kelly at gmail.com
Fri Jun 8 18:48:17 EDT 2012
On Fri, Jun 8, 2012 at 4:24 PM, Dan Stromberg <drsalists at gmail.com> wrote:
> Am I misinterpreting this? It seems like according to the PEP, I should
> have still been able to import treap.py 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 __init__.py in
your treap directory?
More information about the Python-list
mailing list