Commit 5d1554a2 authored by Kit Sunde's avatar Kit Sunde Committed by Mariatta

json Docs: Trivial update to the code example (GH-2465)

Replace `dumps` with `json.dumps`
parent f6d6480b
......@@ -89,7 +89,7 @@ Extending :class:`JSONEncoder`::
... # Let the base class default method raise the TypeError
... return json.JSONEncoder.default(self, obj)
...
>>> dumps(2 + 1j, cls=ComplexEncoder)
>>> json.dumps(2 + 1j, cls=ComplexEncoder)
'[2.0, 1.0]'
>>> ComplexEncoder().encode(2 + 1j)
'[2.0, 1.0]'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment