A context manager for preparing the source for expressions. It adds *start* to the buffer and enters, after exit it adds *end*.
(self, start, end)
| 756 | |
| 757 | @contextmanager |
| 758 | def delimit(self, start, end): |
| 759 | """A context manager for preparing the source for expressions. It adds |
| 760 | *start* to the buffer and enters, after exit it adds *end*.""" |
| 761 | |
| 762 | self.write(start) |
| 763 | yield |
| 764 | self.write(end) |
| 765 | |
| 766 | def delimit_if(self, start, end, condition): |
| 767 | if condition: |
no test coverage detected