Import semantics?

Devin Jeanpierre jeanpierreda at gmail.com
Fri Jun 8 19:05:28 EDT 2012


On Fri, Jun 8, 2012 at 6: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.

Only if treap/ and treap.py were in the same directory. Otherwise it
looks like whichever comes first in the search path is imported first.

-- Devin



More information about the Python-list mailing list