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=' ')
| 247 | self.output_width += width |
| 248 | |
| 249 | def breakable(self, sep=' '): |
| 250 | """ |
| 251 | Add a breakable separator to the output. This does not mean that it |
| 252 | will automatically break here. If no breaking on this position takes |
| 253 | place the `sep` is inserted which default to one space. |
| 254 | """ |
| 255 | width = len(sep) |
| 256 | group = self.group_stack[-1] |
| 257 | if group.want_break: |
| 258 | self.flush() |
| 259 | self.output.write(self.newline) |
| 260 | self.output.write(' ' * self.indentation) |
| 261 | self.output_width = self.indentation |
| 262 | self.buffer_width = 0 |
| 263 | else: |
| 264 | self.buffer.append(Breakable(sep, width, self)) |
| 265 | self.buffer_width += width |
| 266 | self._break_outer_groups() |
| 267 | |
| 268 | def break_(self): |
| 269 | """ |