Nick Coghlan added the comment:

__import__ is intended as an absolute override (including of the sys.modules 
cache lookup), so we can't bypass it without breaking backwards compatibility.

It's possible there is room for other optimisations that don't break the import 
override semantics (such as a fast path for when __import__ is the standard 
import function).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22557>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to