bundles / IPython 9.14.0.dev / IPython / core / inputtransformer2 / assemble_continued_line
function
IPython.core.inputtransformer2:assemble_continued_line
Signature
def assemble_continued_line ( lines , start : Tuple[int, int] , end_line : int ) Summary
Assemble a single line from multiple continued line pieces
Extended Summary
Continued lines are lines ending in \``, and the line following the last ``\ in the block.
For example, this code continues over multiple lines
if (assign_ix is not None) \ and (len(line) >= assign_ix + 2) \ and (line[assign_ix+1].string == '%') \ and (line[assign_ix+2].type == tokenize.NAME):
This statement contains four continued line pieces. Assembling these pieces into a single line would give
if (assign_ix is not None) and (len(line) >= assign_ix + 2) and (line[...This uses 0-indexed line numbers. start is (lineno, colno).
Used to allow %magic and !system commands to be continued over multiple lines.
Aliases
-
IPython.core.inputtransformer2.assemble_continued_line