Fredrik Lundh <fredrik@pythonware.com>: > how do you detect that a module is successfully imported? > > the only way I can think of is "execution reached the end of > the module", which would probably break considerable amounts > of code that rely on "temporarily recursive" imports. If an exception propagates back through an import statement, the module that it's importing is marked as broken. This may result in a single error causing more than one module to be marked as broken, but I think that's the right thing to do anyway. E.g. if you import module A which imports module B which fails, you can't be sure that either A or B is fit to use, so both should be marked as broken. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4