Add a breakable separator to the output. This does not mean that it will automatically break here. If no breaking on this position takes place the `sep` is inserted which default to one space.
(self, sep=' ')
| 229 | self.output_width += width |
| 230 | |
| 231 | def breakable(self, sep=' '): |
| 232 | """ |
| 233 | Add a breakable separator to the output. This does not mean that it |
| 234 | will automatically break here. If no breaking on this position takes |
| 235 | place the `sep` is inserted which default to one space. |
| 236 | """ |
| 237 | width = len(sep) |
| 238 | group = self.group_stack[-1] |
| 239 | if group.want_break: |
| 240 | self.flush() |
| 241 | self.output.write(self.newline) |
| 242 | self.output.write(' ' * self.indentation) |
| 243 | self.output_width = self.indentation |
| 244 | self.buffer_width = 0 |
| 245 | else: |
| 246 | self.buffer.append(Breakable(sep, width, self)) |
| 247 | self.buffer_width += width |
| 248 | self._break_outer_groups() |
| 249 | |
| 250 | def break_(self): |
| 251 | """ |