]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-154320: Fix swapped __defaults__/__kwdefaults__ in annotationlib docs (#154321)
authorSolaris-star <67425364+Solaris-star@users.noreply.github.com>
Tue, 21 Jul 2026 12:45:42 +0000 (20:45 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2026 12:45:42 +0000 (12:45 +0000)
commitdc72be1923a37042aee60354059e43d472de7803
treebf5039a217c2bf5a6157fd3fd3e648e6a6be7e93
parent7ebe773160327026ba5393b27e2e2860db4d08b2
gh-154320: Fix swapped __defaults__/__kwdefaults__ in annotationlib docs (#154321)

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
Doc/library/annotationlib.rst