New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliased __str__ to __repr__ #1048

Merged
merged 6 commits into from Jan 11, 2017

Conversation

Projects
None yet
2 participants
@jlstevens
Member

jlstevens commented Jan 10, 2017

PR implementing the suggestion in #966. The code change is tiny (aliasing __str__ to __repr__) and most of this PR will be about updating the docs.

Here is the behavior before:

image

And after:

image

Of course I'll make sure to put the parens around print in the notebooks for Python 3 support!

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jan 10, 2017

I've now updated all the notebooks using print(repr(..)) and I have been careful to make sure the notebook tests kept passing.

Unfortunately, there are two notebooks with fixes that I do expect will result in test failures. These involve use of naked repr(..) which should result in different output (due to extra quotes compared to print).

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jan 10, 2017

As expected the tests failed. I thought only one cell would fail, but as repr returns a string whereas print outputs to standard output, the test data is now shifted. Rebuilding the test data now.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Jan 10, 2017

Now the test data has been updated, the pr build passed and the push build failed (as expected). Ready to review/merge.

@jlstevens jlstevens requested a review from philippjfr Jan 10, 2017

@philippjfr

Looks good. Happy to merge.

@philippjfr philippjfr merged commit 28db99d into master Jan 11, 2017

3 of 4 checks passed

continuous-integration/travis-ci/push The Travis CI build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.005%) to 76.854%
Details
s3-reference-data-cache Test data is cached.
Details

@philippjfr philippjfr deleted the str_is_repr branch Jan 27, 2017

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