From 32d11c96537efb954da55a2167f6aa99a0bf2173 Mon Sep 17 00:00:00 2001 From: Bjorn Date: Mon, 16 Nov 2020 15:57:06 +0100 Subject: [PATCH] fix typo in pickle example (#2669) --- docs/upgrade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 87bcebee2..f13fbcf56 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -192,7 +192,7 @@ way to get and set object state. See :ref:`pickling` for details. ... .def(py::pickle( [](const Foo &self) { // __getstate__ - return py::make_tuple(f.value1(), f.value2(), ...); // unchanged + return py::make_tuple(self.value1(), self.value2(), ...); // unchanged }, [](py::tuple t) { // __setstate__, note: no `self` argument return new Foo(t[0].cast(), ...);