[pypy-commit] pypy default: Better use %r than '%s' in case it's a non-printable byte
arigo
pypy.commits at gmail.com
Wed Jan 6 07:24:31 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r81598:c245f85e49a9
Date: 2016-01-06 13:23 +0100
http://bitbucket.org/pypy/pypy/changeset/c245f85e49a9/
Log: Better use %r than '%s' in case it's a non-printable byte
diff --git a/lib_pypy/cPickle.py b/lib_pypy/cPickle.py
--- a/lib_pypy/cPickle.py
+++ b/lib_pypy/cPickle.py
@@ -170,7 +170,7 @@
try:
meth = self.dispatch[key]
except KeyError:
- raise UnpicklingError("invalid load key, '%s'." % chr(key))
+ raise UnpicklingError("invalid load key, %r." % chr(key))
meth(self)
key = ord(self.read(1))
except TypeError:
More information about the pypy-commit
mailing list