r"""Reads a python statement. >>> read_statement = Parser().read_statement >>> read_statement('for i in range(10): hello $name') ('for i in range(10):', ' hello $name')
(self, text)
| 431 | return block, text |
| 432 | |
| 433 | def read_statement(self, text): |
| 434 | r"""Reads a python statement. |
| 435 | |
| 436 | >>> read_statement = Parser().read_statement |
| 437 | >>> read_statement('for i in range(10): hello $name') |
| 438 | ('for i in range(10):', ' hello $name') |
| 439 | """ |
| 440 | tok = PythonTokenizer(text) |
| 441 | tok.consume_till(":") |
| 442 | return text[: tok.index], text[tok.index :] |
| 443 | |
| 444 | def read_block_section(self, text, begin_indent=""): |
| 445 | r""" |
no test coverage detected