diff options
Diffstat (limited to 'simplejson/__init__.py')
-rw-r--r-- | simplejson/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/simplejson/__init__.py b/simplejson/__init__.py index 8b4f458..d5b4d39 100644 --- a/simplejson/__init__.py +++ b/simplejson/__init__.py @@ -78,7 +78,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]' |