like begin_group / end_group but for the with statement.
(self, indent=0, open='', close='')
| 185 | |
| 186 | @contextmanager |
| 187 | def group(self, indent=0, open='', close=''): |
| 188 | """like begin_group / end_group but for the with statement.""" |
| 189 | self.begin_group(indent, open) |
| 190 | try: |
| 191 | yield |
| 192 | finally: |
| 193 | self.end_group(indent, close) |
| 194 | |
| 195 | class PrettyPrinter(_PrettyPrinterBase): |
| 196 | """ |