File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,13 @@ The :mod:`linecache` module defines the following functions:
3030
3131 .. index :: triple: module; search; path
3232
33- If a file named *filename * is not found, the function will look for it in the
34- module search path, ``sys.path ``, after first checking for a :pep: `302 `
35- ``__loader__ `` in *module_globals *, in case the module was imported from a
36- zipfile or other non-filesystem import source.
33+ If a file named *filename * is not found, the function first checks
34+ for a :pep: `302 ` ``__loader__ `` in *module_globals *.
35+ If there is such a loader and it defines a ``get_source `` method,
36+ then that determines the source lines
37+ (if ``get_source() `` returns ``None ``, then ``'' `` is returned).
38+ Finally, if *filename * is a relative filename,
39+ it is looked up relative to the entries in the module search path, ``sys.path ``.
3740
3841
3942.. function :: clearcache()
You can’t perform that action at this time.
0 commit comments