You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / core / inputtransformer2 / TransformerManager / do_one_token_transform

function

IPython.core.inputtransformer2:TransformerManager.do_one_token_transform

source: /IPython/core/inputtransformer2.py :684

Signature

def   do_one_token_transform ( self lines )

Summary

Find and run the transform earliest in the code.

Extended Summary

Returns (changed, lines).

This method is called repeatedly until changed is False, indicating that all available transformations are complete.

The tokens following IPython special syntax might not be valid, so the transformed code is retokenised every time to identify the next piece of special syntax. Hopefully long code cells are mostly valid Python, not using lots of IPython special syntax, so this shouldn't be a performance issue.

Aliases

  • IPython.core.inputtransformer2.TransformerManager.do_one_token_transform