summaryrefslogtreecommitdiff
path: root/index.rst
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2009-02-16 04:51:11 +0000
committerBob Ippolito <bob@redivi.com>2009-02-16 04:51:11 +0000
commitcf3c2982660b9b654c9cb8347bdbab67c2e1ca7a (patch)
treeb838ac4294dd361f6af838b935effde5b3c1191d /index.rst
parentf909e2fb180a63dccb8311b28ec8ea5db34c9466 (diff)
downloadsimplejson-cf3c2982660b9b654c9cb8347bdbab67c2e1ca7a.tar.gz
replace a few string formats with string addition to make py26+ porting easier
git-svn-id: http://simplejson.googlecode.com/svn/trunk@168 a4795897-2c25-0410-b006-0d3caba88fa1
Diffstat (limited to 'index.rst')
-rw-r--r--index.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.rst b/index.rst
index 41133c0..0bc8577 100644
--- a/index.rst
+++ b/index.rst
@@ -85,7 +85,7 @@ Specializing JSON object encoding::
>>> def encode_complex(obj):
... if isinstance(obj, complex):
... return [obj.real, obj.imag]
- ... raise TypeError("%r is not JSON serializable" % (o,))
+ ... raise TypeError(repr(o) + " is not JSON serializable")
...
>>> json.dumps(2 + 1j, default=encode_complex)
'[2.0, 1.0]'