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: strThe executable Python source code to cache and compile.
number: intA number which forms part of the code's name. Used for the execution counter.
raw_code: strThe 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