Make a branch out of an iterable of Result objects This generates a Result from the given sequence of Results, forcing each expression context as a statement before the next result is used. We keep the expression context of the last argument for the returned Result
(self, exprs)
| 465 | |
| 466 | @builds_model(Lazy) |
| 467 | def _compile_branch(self, exprs): |
| 468 | """Make a branch out of an iterable of Result objects |
| 469 | |
| 470 | This generates a Result from the given sequence of Results, forcing each |
| 471 | expression context as a statement before the next result is used. |
| 472 | |
| 473 | We keep the expression context of the last argument for the returned Result |
| 474 | """ |
| 475 | result = Result() |
| 476 | last = None |
| 477 | for node in exprs: |
| 478 | if last is not None: |
| 479 | result += last.expr_as_stmt() |
| 480 | last = self.compile(node) |
| 481 | result += last |
| 482 | return result |
| 483 | |
| 484 | def _storeize(self, expr, name, func=None): |
| 485 | """Return a new `name` object with an ast.Store() context""" |
no test coverage detected