18 Nov
2010
18 Nov
'10
8:32 p.m.
Tarek Ziadé writes:
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 :)
So you're suggesting (pseudo-code, not Python!) message = usual_message if object is instance of ModuleType: message += "\nreferenced object is a module; are your imports OK?" raise AttributeError(message) or something like that?