@@ -353,8 +353,8 @@ Overloads
353353
354354If a function or method can return multiple different types and those
355355types can be determined based on the presence or types of certain
356- parameters, use the ``@overload `` mechanism defined in ` PEP
357- 484 <https://www.python.org/dev/peps/pep-0484/#id45> `__ . When overloads
356+ parameters, use the ``@overload `` mechanism described in the
357+ :py:data: ` typing.overload ` documentation . When overloads
358358are used within a “.py” file, they must appear prior to the function
359359implementation, which should not have an ``@overload `` decorator.
360360
@@ -471,8 +471,8 @@ Generic Classes and Functions
471471-----------------------------
472472
473473Classes and functions that can operate in a generic manner on various
474- types should declare themselves as generic using the mechanisms
475- described in :pep: ` 484 `.
474+ types should declare themselves as generic using standard typing
475+ mechanisms such as `` TypeVar ` `.
476476This includes the use of ``TypeVar `` symbols. Typically, a ``TypeVar ``
477477should be private to the file that declares it, and should therefore
478478begin with an underscore.
@@ -499,7 +499,7 @@ annotation.
499499 # Recursive type alias
500500 TreeNode = LeafNode | list[" TreeNode" ]
501501
502- # Explicit type alias using PEP 613 syntax
502+ # Explicit type alias using TypeAlias
503503 StrOrInt: TypeAlias = str | int
504504
505505 Abstract Classes and Methods
0 commit comments