We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de78bdd commit 32d11c9Copy full SHA for 32d11c9
docs/upgrade.rst
@@ -192,7 +192,7 @@ way to get and set object state. See :ref:`pickling` for details.
192
...
193
.def(py::pickle(
194
[](const Foo &self) { // __getstate__
195
- return py::make_tuple(f.value1(), f.value2(), ...); // unchanged
+ return py::make_tuple(self.value1(), self.value2(), ...); // unchanged
196
},
197
[](py::tuple t) { // __setstate__, note: no `self` argument
198
return new Foo(t[0].cast<std::string>(), ...);
0 commit comments