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

Method get_base_indent_string

Lib/idlelib/pyparse.py:556–566  ·  view source on GitHub ↗

Return the leading whitespace on the initial line of the last interesting stmt.

(self)

Source from the content-addressed store, hash-verified

554 self.tabwidth)) + 1
555
556 def get_base_indent_string(self):
557 """Return the leading whitespace on the initial line of the last
558 interesting stmt.
559 """
560 self._study2()
561 i, n = self.stmt_start, self.stmt_end
562 j = i
563 code = self.code
564 while j < n and code[j] in " \t":
565 j = j + 1
566 return code[i:j]
567
568 def is_block_opener(self):
569 "Return True if the last interesting statement opens a block."

Callers 1

Calls 1

_study2Method · 0.95

Tested by

no test coverage detected