6 Dec
2010
6 Dec
'10
12:25 p.m.
Tarek Ziadé
On Fri, Nov 19, 2010 at 12:21 AM, Michael Foord
wrote: If you use the "from module import something" form it will be an ImportError. If you do "import module" and then "module.something" you will see an AttributeError. These are the ones that can be confusing.
Yes that's the case I was thinking of. After years of Python I can still get trapped on those. But maybe that's just me :)
It's not just you, I get that too and it's really annoying. I have a one-module- per-class approach so it happens a lot to me. I would love to have more informative error messages when this happens. Ram.