From 46bc21e1780016aaacd34e472f838dc792fb674c Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Wed, 9 Sep 2020 14:01:38 -0400 Subject: [PATCH] =?UTF-8?q?[3.9]=20bpo-41688:=20Document=20bug=20in=20**?= =?UTF-8?q?=3D=20dispatching=20in=20the=20language=20data=E2=80=A6=20(GH-2?= =?UTF-8?q?2172)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I tossed in a "This bug is fixed in Python 3.10" sentence but I'm not sure if that's appropriate to have here. --- Doc/reference/datamodel.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index a817408c3b1..fc304a191a3 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2409,6 +2409,13 @@ left undefined. :ref:`faq-augmented-assignment-tuple-error`), but this behavior is in fact part of the data model. + .. note:: + + Due to a bug in the dispatching mechanism for ``**=``, a class that + defines :meth:`__ipow__` but returns ``NotImplemented`` would fail to + fall back to ``x.__pow__(y)`` and ``y.__rpow__(x)``. This bug is fixed + in Python 3.10. + .. method:: object.__neg__(self) object.__pos__(self)