The Python Language Reference Manual by Chris Sheridan
Author:Chris Sheridan [Sheridan, Chris]
Language: eng
Format: epub, mobi, pdf
ISBN: 9781326570972
Publisher: Lulu.com
Published: 2016-02-19T23:00:00+00:00
If a path entry finder is returned by one of the path entry hook callables on sys.path_hooks, then the following
protocol is used to ask the finder for a module loader, which is then used to load the module.
5.5.2 Path entry finder protocol
In order to support imports of modules and initialized packages and also to contribute portions to namespace packages,
path entry finders must implement the find_loader() method.
find_loader() takes one argument, the fully qualified name of the module being imported. find_loader()
returns a 2-tuple where the first item is the loader and the second item is a namespace portion. When the first item
(i.e. the loader) is None, this means that while the path entry finder does not have a loader for the named module, it
knows that the path entry contributes to a namespace portion for the named module. This will almost always be the
case where Python is asked to import a namespace package that has no physical presence on the file system. When a
path entry finder returns None for the loader, the second item of the 2-tuple return value must be a sequence, although
it can be empty.
If find_loader() returns a non-None loader value, the portion is ignored and the loader is returned from the path
based finder, terminating the search through the path entries.
For backwards compatibility with other implementations of the import protocol, many path entry finders also support
the same, traditional find_module() method that meta path finders support. However path entry finder
find_module() methods are never called with a path argument (they are expected to record the appropriate
path information from the initial call to the path hook).
The find_module() method on path entry finders is deprecated, as it does not allow the path entry finder to contribute
portions to namespace packages. Instead path entry finders should implement the find_loader() method
as described above. If it exists on the path entry finder, the import system will always call find_loader() in
preference to find_module().
Download
The Python Language Reference Manual by Chris Sheridan.mobi
The Python Language Reference Manual by Chris Sheridan.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12585)
Hello! Python by Anthony Briggs(9921)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9799)
The Mikado Method by Ola Ellnestam Daniel Brolund(9782)
Dependency Injection in .NET by Mark Seemann(9345)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(9306)
Hit Refresh by Satya Nadella(8826)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8305)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7787)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7769)
Grails in Action by Glen Smith Peter Ledbrook(7700)
The Kubernetes Operator Framework Book by Michael Dame(7672)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7563)
Exploring Deepfakes by Bryan Lyon and Matt Tora(7463)
Practical Computer Architecture with Python and ARM by Alan Clements(7384)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7367)
Robo-Advisor with Python by Aki Ranin(7342)
Building Low Latency Applications with C++ by Sourav Ghosh(7247)
Svelte with Test-Driven Development by Daniel Irvine(7213)
