Skip to content

Commit 8cc9875

Browse files
committed
Mention get_annotations() early
1 parent f5fc943 commit 8cc9875

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Doc/library/typing.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,8 +3333,8 @@ Introspection helpers
33333333
Return a dictionary containing type hints for a function, method, module
33343334
or class object.
33353335

3336-
This is often the same as ``obj.__annotations__``, but this function makes
3337-
the following changes to the annotations dictionary:
3336+
This is often the same as :func:`annotationlib.get_annotations`, but this
3337+
function makes the following changes to the annotations dictionary:
33383338

33393339
* Forward references encoded as string literals or :class:`ForwardRef`
33403340
objects are handled by evaluating them in *globalns*, *localns*, and
@@ -3357,9 +3357,6 @@ Introspection helpers
33573357
with ``T``, unless *include_extras* is set to ``True`` (see
33583358
:class:`Annotated` for more information).
33593359

3360-
See also :func:`annotationlib.get_annotations`, a lower-level function that
3361-
returns annotations more directly.
3362-
33633360
.. caution::
33643361

33653362
This function may execute arbitrary code contained in annotations.

0 commit comments

Comments
 (0)