Traverse and separate the given *items* with a comma and append it to the buffer. If *items* is a single item sequence, a trailing comma will be added.
(self, traverser, items)
| 72 | f(x) |
| 73 | |
| 74 | def items_view(self, traverser, items): |
| 75 | """Traverse and separate the given *items* with a comma and append it to |
| 76 | the buffer. If *items* is a single item sequence, a trailing comma |
| 77 | will be added.""" |
| 78 | if len(items) == 1: |
| 79 | traverser(items[0]) |
| 80 | self.write(",") |
| 81 | else: |
| 82 | self.interleave(lambda: self.write(", "), traverser, items) |
| 83 | |
| 84 | def maybe_newline(self): |
| 85 | """Adds a newline if it isn't the start of generated source""" |
no test coverage detected