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

Use repr() to make quoted strings #1019

Merged
merged 3 commits into from Nov 20, 2011
Merged

Conversation

takluyver
Copy link
Member

Should at least begin to fix #1009, by correctly escaping strings with \U or \u in them.

This only broke a few tests because repr defaults to 'single quotes', whereas our implementation defaulted to "double quotes". I've fixed those.

Bonus fix: a couple of config tests were failing on Python 3.

@rkern
Copy link
Contributor

rkern commented Nov 20, 2011

Note that %r will do the repr() for you.

('%r' % value) == ('%s' % repr(value))

@takluyver
Copy link
Member Author

Good point. Done.

fperez added a commit that referenced this pull request Nov 20, 2011
Use repr() to make quoted strings.  This simplifies our quoting code by letting us rely on built-in capabilities of the language.
@fperez fperez merged commit 268ecbe into ipython:master Nov 20, 2011
@fperez
Copy link
Member

fperez commented Nov 20, 2011

Thanks, looks great (and to @rkern for the review!). Merged.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Use repr() to make quoted strings.  This simplifies our quoting code by letting us rely on built-in capabilities of the language.
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.

Windows: regression in cd magic handling of paths
3 participants