Message140318
| Author |
r.david.murray |
| Recipients |
Calvin.Spealman, eric.snow, r.david.murray |
| Date |
2011年07月13日.23:13:52 |
| SpamBayes Score |
1.0022723e-05 |
| Marked as misclassified |
No |
| Message-id |
<1310598833.46.0.358697480705.issue12554@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Yes, that's exactly my point. The loading of a module into sys.modules is a separate issue from the creation of a pointer to that module in the local name space. Once the former succeeds, it has succeeded and won't be done again. When the module that did the import fails to complete, *it* is cleaned up, which cleans up the pointer in the local name space, but that doesn't (by design) affect sys.modules.
It's not all that dissimilar to what would happen if you had top-level code in your module that opened and wrote to a file. If an exception later in the module code causes it to fail to load, the file it created would not be deleted. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年07月13日 23:13:53 | r.david.murray | set | recipients:
+ r.david.murray, Calvin.Spealman, eric.snow |
| 2011年07月13日 23:13:53 | r.david.murray | set | messageid: <1310598833.46.0.358697480705.issue12554@psf.upfronthosting.co.za> |
| 2011年07月13日 23:13:52 | r.david.murray | link | issue12554 messages |
| 2011年07月13日 23:13:52 | r.david.murray | create |
|