]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-150501: Correct `inspect.getattr_static` docs signature (#150504)
authorJonathan Dung <jonathandung@yahoo.com>
Sat, 30 May 2026 09:18:25 +0000 (17:18 +0800)
committerGitHub <noreply@github.com>
Sat, 30 May 2026 09:18:25 +0000 (11:18 +0200)
Doc/library/inspect.rst

index 92840e702fbbfe6e522a2df3796861d4e2a431bf..a0f7379b12a8a627c8dfcfcfc76e9884cfb73548 100644 (file)
@@ -1614,10 +1614,11 @@ properties, will be invoked and :meth:`~object.__getattr__` and
 may be called.
 
 For cases where you want passive introspection, like documentation tools, this
-can be inconvenient. :func:`getattr_static` has the same signature as :func:`getattr`
+can be inconvenient. :func:`getattr_static` has a similar signature as :func:`getattr`
 but avoids executing code when it fetches attributes.
 
-.. function:: getattr_static(obj, attr, default=None)
+.. function:: getattr_static(obj, attr)
+              getattr_static(obj, attr, default)
 
    Retrieve attributes without triggering dynamic lookup via the
    descriptor protocol, :meth:`~object.__getattr__`