]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-41688: Document bug in **= dispatching in the language data… (GH-22172)
authorAmmar Askar <ammar@ammaraskar.com>
Wed, 9 Sep 2020 18:01:38 +0000 (14:01 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Sep 2020 18:01:38 +0000 (11:01 -0700)
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

index a817408c3b1ef555373fd61d4d9168e170df1385..fc304a191a3149ba3bb6d30ca12671c5896d9121 100644 (file)
@@ -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)