diff options
Diffstat (limited to 'Doc/library/linecache.rst')
-rw-r--r-- | Doc/library/linecache.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index f18b1cdac0..6c92cc58d2 100644 --- a/Doc/library/linecache.rst +++ b/Doc/library/linecache.rst @@ -47,6 +47,14 @@ The :mod:`linecache` module defines the following functions: changed on disk, and you require the updated version. If *filename* is omitted, it will check all the entries in the cache. +.. function:: lazycache(filename, module_globals) + + Capture enough detail about a non-file based module to permit getting its + lines later via :func:`getline` even if *module_globals* is None in the later + call. This avoids doing I/O until a line is actually needed, without having + to carry the module globals around indefinitely. + + .. versionadded:: 3.5 Example:: |