Skip to content

Commit 3a15d16

Browse files
[3.13] gh-150501: Correct inspect.getattr_static docs signature (GH-150504) (#150603)
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 6e9da09 commit 3a15d16

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
@@ -1515,10 +1515,11 @@ properties, will be invoked and :meth:`~object.__getattr__` and
15151515
may be called.
15161516

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

1521-
.. function:: getattr_static(obj, attr, default=None)
1521+
.. function:: getattr_static(obj, attr)
1522+
getattr_static(obj, attr, default)
15221523

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

0 commit comments

Comments
 (0)