Skip to content

Split __str__ and __repr__ on Timecode#73

Open
nickswalker wants to merge 1 commit into
eoyilmaz:mainfrom
nickswalker:str-repr-split
Open

Split __str__ and __repr__ on Timecode#73
nickswalker wants to merge 1 commit into
eoyilmaz:mainfrom
nickswalker:str-repr-split

Conversation

@nickswalker

Copy link
Copy Markdown

@cubicibo proposed some good changes in #69. I am chunking out some of the non-core parts of that PR in the hopes that it'd be easier to review.

__repr__ now returns a Python-eval-able form; __str__ returns the timecode string (the previous __repr__ behavior). Adds test_repr_parse to verify round-trip fidelity.

This is what the __repr__ docs say is expected:

If at all possible, this should look like a valid Python expression that could be used to recreate an object with the same value (given an appropriate environment).

__repr__ now returns a Python-eval-able form; __str__ returns the
timecode string (the previous __repr__ behavior). Adds test_repr_parse
to verify round-trip fidelity.

Co-authored-by: cubicibo <55701024+cubicibo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant