The bullet list under "Creating a custom callable annotate function"
had the attribute names reversed: positional defaults are __defaults__
(a tuple) and keyword defaults are __kwdefaults__ (a dict). The example
code below was already correct.
Fixes #154320
:attr:`~Format.VALUE_WITH_FAKE_GLOBALS`.
* A :ref:`code object <code-objects>` ``__code__`` containing the compiled code for the
annotate function.
-* Optional: A tuple of the function's positional defaults ``__kwdefaults__``, if the
+* Optional: A tuple of the function's positional defaults ``__defaults__``, if the
function represented by ``__code__`` uses any positional defaults.
-* Optional: A dict of the function's keyword defaults ``__defaults__``, if the function
+* Optional: A dict of the function's keyword defaults ``__kwdefaults__``, if the function
represented by ``__code__`` uses any keyword defaults.
* Optional: All other :ref:`function attributes <inspect-types>`.