Skip to content

Commit 5d1554a

Browse files
kitsundeMariatta
authored andcommitted
json Docs: Trivial update to the code example (GH-2465)
Replace `dumps` with `json.dumps`
1 parent f6d6480 commit 5d1554a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/json.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Extending :class:`JSONEncoder`::
8989
... # Let the base class default method raise the TypeError
9090
... return json.JSONEncoder.default(self, obj)
9191
...
92-
>>> dumps(2 + 1j, cls=ComplexEncoder)
92+
>>> json.dumps(2 + 1j, cls=ComplexEncoder)
9393
'[2.0, 1.0]'
9494
>>> ComplexEncoder().encode(2 + 1j)
9595
'[2.0, 1.0]'

0 commit comments

Comments
 (0)