Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docs
  • Loading branch information
gaogaotiantian committed Apr 2, 2025
commit 188329c961eabdcae73940eb8075484eaecde2ba
8 changes: 8 additions & 0 deletions Doc/library/linecache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ The :mod:`linecache` module defines the following functions:

.. index:: triple: module; search; path

If *filename* indicates a frozen module (starting with ``<frozen ``), the function
will attepmt to get the real file name from ``module_globals['__file__']`` if
*module_globals* is not ``None``.

If a file named *filename* is not found, the function first checks
for a :pep:`302` ``__loader__`` in *module_globals*.
If there is such a loader and it defines a ``get_source`` method,
Expand All @@ -38,6 +42,10 @@ The :mod:`linecache` module defines the following functions:
Finally, if *filename* is a relative filename,
it is looked up relative to the entries in the module search path, ``sys.path``.

.. versionchanged:: 3.14

Support *filename* of frozen modules.


.. function:: clearcache()

Expand Down
Loading