Re: Import semantics?

2012-06-08 Thread Dan Stromberg
And a link to the ticket: http://bugs.python.org/issue15039 > -- http://mail.python.org/mailman/listinfo/python-list

Re: Import semantics?

2012-06-08 Thread Dan Stromberg
On Fri, Jun 8, 2012 at 3:48 PM, Ian Kelly wrote: > On Fri, Jun 8, 2012 at 4:24 PM, Dan Stromberg 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

Re: Import semantics?

2012-06-08 Thread Devin Jeanpierre
On Fri, Jun 8, 2012 at 6:24 PM, Dan Stromberg 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

Re: Import semantics?

2012-06-08 Thread Ian Kelly
On Fri, Jun 8, 2012 at 4:24 PM, Dan Stromberg 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 existe

Re: Import semantics?

2012-06-08 Thread Dan Stromberg
On Fri, Jun 8, 2012 at 3:16 PM, Ethan Furman wrote: > Dan Stromberg wrote: > >> >> Did the import semantics change in cpython 3.3a4? >> >> I used to be able to import treap.py even though I had a treap directory >> in my cwd. With 3.3a4, I have to rename the treap directory to see >> treap.py. >

Re: Import semantics?

2012-06-08 Thread Ethan Furman
Dan Stromberg wrote: Did the import semantics change in cpython 3.3a4? I used to be able to import treap.py even though I had a treap directory in my cwd. With 3.3a4, I have to rename the treap directory to see treap.py. Check out PEP 420 -- Implicit Namespace Packages [http://www.python.

Re: Import Semantics, or 'What's the scope of an import?', and class attribute instantiation

2004-12-04 Thread Diez B. Roggisch
Hi, > I'm having some trouble with understanding python's importing behaviour > in my application. I'm using psyco to optimise part of my code, but I'm > not sure whether it inherits throughout the rest of my application (read > this as for any imported module) if I import in in a 'higher-level' >