IPython 8.4.0 Pypi GitHub Homepage
Other Docs
assemble_continued_line(lines, start: Tuple[int, int], end_line: int)

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.

Assemble a single line from multiple continued line pieces

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/core/inputtransformer2.py#160
type: <class 'function'>
Commit: