From d69092a776ec06766efcd76c23a6f6abd6298b7c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 10 Jul 2020 11:46:47 +0200 Subject: Clarify changelog entry on ways to deal with the incompatible binop method change. --- CHANGES.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index cfd0bec44..a6d55de35 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,9 +11,12 @@ Features added * Special methods for binary operators now follow Python semantics. Rather than e.g. a single ``__add__`` method for cdef classes, where "self" can be either the first or second argument, one can now define - both ``__add__`` and ``__radd__`` as for standard Python classes . + both ``__add__`` and ``__radd__`` as for standard Python classes. This behavior can be disabled with the ``c_api_binop_methods`` directive - to return to the previous semantics in Cython code. + to return to the previous semantics in Cython code (available from Cython + 0.29.20), or the reversed method (``__radd__``) can be implemented in + addition to an existing two-sided operator method (``__add__``) to get a + backwards compatible implementation. (Github issue #2056) * No/single argument functions now accept keyword arguments by default in order -- cgit v1.2.1