PEP 328 seems at the moment to only describe the syntactic, surface and as-seen-by-the-user aspects of the new behavior for absolute/relative imports. What is going to happen to __import__ hook? At the moment relative imports as the default are implemented at that level, through get_parent and the first load_next in import_module_ex which is exported as __import__. Will imports still be implemented in terms of/on top of __import__. What will be the contract for __import__ then? I suppose it could be kept the same, relaxing over time the obligation to implement relative imports. At the moment a __import__ hook can be forced in absolute import mode by passing an empty globals dict. I think the PEP should cover some of this. regards.
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