Use repr() to make quoted strings #1019

merged 3 commits into from Nov 20, 2011


None yet

3 participants


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 commented Nov 20, 2011

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

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

Good point. Done.

@fperez fperez merged commit 268ecbe into ipython:master Nov 20, 2011
fperez commented Nov 20, 2011

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

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