MCPcopy Index your code
hub / github.com/python/cpython / get_num_lines_in_stmt

Method get_num_lines_in_stmt

Lib/idlelib/pyparse.py:489–497  ·  view source on GitHub ↗

Return number of physical lines in last stmt. The statement doesn't have to be an interesting statement. This is intended to be called when continuation is C_BACKSLASH.

(self)

Source from the content-addressed store, hash-verified

487 return len(code[i:j].expandtabs(self.tabwidth)) + extra
488
489 def get_num_lines_in_stmt(self):
490 """Return number of physical lines in last stmt.
491
492 The statement doesn't have to be an interesting statement. This is
493 intended to be called when continuation is C_BACKSLASH.
494 """
495 self._study1()
496 goodlines = self.goodlines
497 return goodlines[-1] - goodlines[-2]
498
499 def compute_backslash_indent(self):
500 """Return number of spaces the next line should be indented.

Callers 1

Calls 1

_study1Method · 0.95

Tested by

no test coverage detected