In the section on the __reduce__ API, the description of the state
argument used an implicit __setitem__ in the last-resort case, but the implementation actually uses setattr. Repaired the pseudocode to match reality. Doc bug spotted by Jim Fulton.
This commit is contained in:
parent
6e249d8955
commit
ce48e1a732
|
@ -206,7 +206,7 @@ Extended __reduce__ API
|
|||
or, if the update() call fails,
|
||||
|
||||
for k, v in state.items():
|
||||
obj[k] = v
|
||||
setattr(obj, k, v)
|
||||
|
||||
listitems Optional, and new in this PEP.
|
||||
If this is not None, it should be an iterator (not a
|
||||
|
|
Loading…
Reference in New Issue