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

Method is_block_opener

Lib/idlelib/pyparse.py:568–571  ·  view source on GitHub ↗

Return True if the last interesting statement opens a block.

(self)

Source from the content-addressed store, hash-verified

566 return code[i:j]
567
568 def is_block_opener(self):
569 "Return True if the last interesting statement opens a block."
570 self._study2()
571 return self.lastch == ':'
572
573 def is_block_closer(self):
574 "Return True if the last interesting statement closes a block."

Callers 1

Calls 1

_study2Method · 0.95

Tested by

no test coverage detected