Skip to content

_raw(s) and _truncate(s, other) handle (nested) lists differently #376

Description

@ivanharvard

In _api.py, _raw flattens nested lists while _truncate does not.

I believe it would be best to not flatten a nested list. A flattened list would obscure issues like these:

expected: 1
2
3
4
5
6
actual: 1
2
[3, 4, 5]
6

(although, in Mismatch, _truncate is called before _raw, so Mismatch will never truly flatten a nested list).

Or perhaps, _raw should not apply new lines to lists at all, considering we want the raw representation of the object in string form.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.xIssues relating to check50 4.xbugquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions