Serhiy Storchaka <> added the comment:

I have applied the Nick's suggestion. Needed to find a place for new test.

The code is copied from PyImport_ImportModuleLevelObject(). I'm not happy from 
how verbose it is. And testing mod.__spec__._initialized adds relatively large 
overhead for importing already imported module in 
PyImport_ImportModuleLevelObject(). Is it possible to invent a faster way for 
checking whether the module is partially imported?


Python tracker <>
Python-bugs-list mailing list

Reply via email to