Skip to content

Feature Request: no newlines in base lists #239

Open
@jessexknight

Description

@jessexknight

I have some content with long and sometimes deeply nested lists (from np.ndarray.tolist()). While it is readable to print with newlines for every element, it would IMO be much cleaner to omit newlines in the inner-most list, and replace with spaces. For example,

Currently:

{
 "arr": [
  [
   0.0,
   null,
   0.468
  ],
  [
   0.0,
   null,
   0.688
  ],
  [
   0.0,
   0.32,
   null
  ],
  [
   0.0,
   0.25,
   null
  ]
 ]
 }
}

Desired:

{
 "arr": [
  [ 0.0, null ,0.468 ],
  [ 0.0, null, 0.688 ],
  [ 0.0, 0.32, null ],
  [ 0.0, 0.25, null ]
 ]
}

Would this be considered? Or too much of a special case?
Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions