Skip to content

Commit 187982a

Browse files
[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 678fd84) Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
1 parent 2f91315 commit 187982a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/library/inspect.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,10 +1614,11 @@ properties, will be invoked and :meth:`~object.__getattr__` and
16141614
may be called.
16151615

16161616
For cases where you want passive introspection, like documentation tools, this
1617-
can be inconvenient. :func:`getattr_static` has the same signature as :func:`getattr`
1617+
can be inconvenient. :func:`getattr_static` has a similar signature as :func:`getattr`
16181618
but avoids executing code when it fetches attributes.
16191619

1620-
.. function:: getattr_static(obj, attr, default=None)
1620+
.. function:: getattr_static(obj, attr)
1621+
getattr_static(obj, attr, default)
16211622

16221623
Retrieve attributes without triggering dynamic lookup via the
16231624
descriptor protocol, :meth:`~object.__getattr__`

0 commit comments

Comments
 (0)