On this page
  1. linecache.lazycache
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

linecache.lazycache

Prev: linecache.getline | Up: linecache
Rel: linecache.checkcache, linecache.clearcache, linecache.getline
Ref: docs.python.org — linecache.lazycache
Tags: #public #python3 #stdlib #linecache


Import

import linecache
from linecache import lazycache

Signature & Overview

linecache.lazycache(filename, module_globals)

Seed the cache for filename with module_globals.

Usage

import linecache

# Registers a module's loader so linecache can read it later even if the file isn't on disk (e.g. zipimport)
assert isinstance(linecache.lazycache(linecache.__file__, linecache.__dict__), bool)

Gotchas

REPL Inspect

from linecache import lazycache
help(lazycache)

Linked from

Related notes