print collection using the specified indent (n) and newline (nl).
(self, c, h, n)
| 354 | return ''.join(s) |
| 355 | |
| 356 | def print_collection(self, c, h, n): |
| 357 | """print collection using the specified indent (n) and newline (nl).""" |
| 358 | if c in h: |
| 359 | return '[]...' |
| 360 | h.append(c) |
| 361 | s = [] |
| 362 | for item in c: |
| 363 | s.append('\n') |
| 364 | s.append(self.indent(n)) |
| 365 | s.append(self.process(item, h, n-2)) |
| 366 | s.append(',') |
| 367 | h.pop() |
| 368 | return ''.join(s) |
| 369 | |
| 370 | def unwrap(self, d, item): |
| 371 | """ translate (unwrap) using an optional wrapper function """ |