This is a development version (latest) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython latest / IPython / core / compilerop / CachingCompiler / cache

function

IPython.core.compilerop:CachingCompiler.cache

source: /IPython/core/compilerop.py :134

Signature

def   cache ( self transformed_code number = 0 raw_code = None )

Summary

Make a name for a block of code, and cache the code.

Parameters

transformed_code : str

The executable Python source code to cache and compile.

number : int

A number which forms part of the code's name. Used for the execution counter.

raw_code : str

The raw code before transformation, if None, set to transformed_code.

Returns

: The name of the cached code (as a string). Pass this as the filename
: argument to compilation, so that tracebacks are correctly hooked up.

Aliases

  • IPython.core.compilerop.CachingCompiler.cache