[Python-Dev] Relative import bug?

Thomas Heller theller at python.net
Fri Sep 22 21:28:24 CEST 2006


Phillip J. Eby schrieb:
> At 08:10 PM 9/22/2006 +0200, Thomas Heller wrote:
>>If x.py contains this:
>>
>>"""
>>from ..b import y
>>import a.b.x
>>from ..b import x
>>"""
...
>>ImportError: cannot import name x
>> >>>
>>
>>A bug?
> 
> If it is, it has nothing to do with relative importing per se.  Note that 
> changing it to "from a.b import x" produces the exact same error.
> 
> This looks like a "standard" circular import bug.

Of course.  Thanks.

Thomas



More information about the Python-Dev mailing list