MCPcopy Index your code
hub / github.com/bpython/bpython / split_lines

Function split_lines

bpython/repl.py:1272–1280  ·  view source on GitHub ↗
(tokens)

Source from the content-addressed store, hash-verified

1270
1271
1272def split_lines(tokens):
1273 for token, value in tokens:
1274 if not value:
1275 continue
1276 while value:
1277 head, newline, value = value.partition("\n")
1278 yield (token, head)
1279 if newline:
1280 yield (Token.Text, newline)
1281
1282
1283def token_is(token_type):

Callers 1

tokenizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected