Skip to content
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

Prefer repr over str for execution results #27

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

Terrance
Copy link
Contributor

Currently, the result of each statement (including just naming an object in scope) is printed to the console by its __str__, whereas the plain Python console uses __repr__. This PR makes the naive change of calling repr() on a result before printing it, though I'm unsure if there's any side-effects of doing so.

@vxgmichel
Copy link
Owner

Thanks very much for creating this PR @OllieTerrance, I can't believe I've never noticed this 😅

@vxgmichel vxgmichel merged commit 0ee76a6 into vxgmichel:master Jun 26, 2018
@Terrance Terrance deleted the shell-result-repr branch June 26, 2018 08:09
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.

2 participants