like begin_group / end_group but for the with statement.
(self, indent=0, open='', close='')
| 167 | |
| 168 | @contextmanager |
| 169 | def group(self, indent=0, open='', close=''): |
| 170 | """like begin_group / end_group but for the with statement.""" |
| 171 | self.begin_group(indent, open) |
| 172 | try: |
| 173 | yield |
| 174 | finally: |
| 175 | self.end_group(indent, close) |
| 176 | |
| 177 | class PrettyPrinter(_PrettyPrinterBase): |
| 178 | """ |