(item)
| 51 | |
| 52 | |
| 53 | def _partition_list(item): |
| 54 | scalars = [] |
| 55 | non_scalars = [] |
| 56 | for element in item: |
| 57 | if isinstance(element, (list, dict)): |
| 58 | non_scalars.append(element) |
| 59 | else: |
| 60 | scalars.append(element) |
| 61 | return scalars, non_scalars |
| 62 | |
| 63 | |
| 64 | def _format_scalar_list(elements, identifier, stream): |