Skip to content

Commit c242aa3

Browse files
committed
Fix error in json deserialize demo
should return obj after setting all attrbutes.
1 parent 2a8c360 commit c242aa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/c06/p02_read-write_json_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ JSON编码的格式对于Python语法而已几乎是完全一样的,除了一
209209
obj = cls.__new__(cls) # Make instance without calling __init__
210210
for key, value in d.items():
211211
setattr(obj, key, value)
212-
return obj
212+
return obj
213213
else:
214214
return d
215215

0 commit comments

Comments
 (0)