On Thu, Nov 18, 2010 at 5:29 PM, Tarek Ziadé <email@example.com> wrote:
> If you use the "from module import something" form it will be anYes that's the case I was thinking of. After years of Python I can
> ImportError. If you do "import module" and then "module.something" you will
> see an AttributeError. These are the ones that can be confusing.
still get trapped on those. But maybe that's just me :)
I certainly have problems with circular imports (especially involving __init__.py), and (as far as I've noticed) the error messages are seldom helpful unless you happen to be experienced in the problem and remember to look for circular imports. Simply giving a better error message for this case would solve the problem in my opinion, without the complexity of actually making anything work that doesn't work now.
Ian Bicking | http://blog.ianbicking.org