Serhiy Storchaka <storchaka+cpyt...@gmail.com> 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 <rep...@bugs.python.org>
<https://bugs.python.org/issue33237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to