Runtime Data Attributes

module.__cached__

Optional path for a module's compiled-code cache. It does not establish that a cache file exists; prefer the specification's cached metadata where available.

Formal Syntax & Structure

python syntaxpython
module.__cached__

Return Value

str (when present)

Value exposed by this attribute; availability and mutability depend on the owner as described.

Working Example

Example Snippetpython
from types import ModuleTypem = ModuleType('demo')print(hasattr(m,'__cached__'))
Python Reference