Re: PEP 451: Big update.
Antoine Pitrou <[email protected]> Thu, 19 Sep 2013 12:22:09 +0200
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have some questions and comments: > origin - a string for the location from which the module is loaded, > e.g. "builtin" for built-in modules and the filename for modules > loaded from source. Filename or filepath? What if the module is stored in e.g. a ZIP file? > submodule_search_locations - list of strings for where to find > submodules, if a package (None otherwise). Why isn't is_package exposed as an attribute too? > cached (property) - a string for where the compiled module will be > stored "where" is a filesystem location? (absolute? relative to the origin?) > has_location (RO-property) - the module's origin refers to a location. filesystem location? What about ZIP files? > spec_from_file_location(name, location, *, loader=None, > submodule_search_locations=None) - factory for file-based module specs What does it mean? Is it able to make "intelligent" decisions depending on e.g. whether the module is an extension module or a pure Python module? > from_loader(name, loader, *, origin=None, is_package=None) - factory > based on information provided by loaders. That description is rather unhelpful. > importlib.find_spec(name, path=None) will return the spec for a module. Is the module supposed to be already loaded or not? How is the spec "found"? Regards Antoine.