[3.15] gh-150501: Correct inspect.getattr_static docs signature (GH-150504) (#150601)

gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504)
(cherry picked from commit 678fd8452c)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
This commit is contained in:
Miss Islington (bot) 2026-05-30 11:25:38 +02:00 committed by GitHub
parent 2f9131575b
commit 187982aa7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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__`