Skip to content

Commit 086c6a6

Browse files
committed
Alex feedback
1 parent 90edd32 commit 086c6a6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/typing.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2687,7 +2687,7 @@ def _overload_dummy(*args, **kwds):
26872687
def overload(func):
26882688
"""Decorator for overloaded functions/methods.
26892689
2690-
In a stub file, place two or more stub definitions for the same
2690+
In a non-stub file, place two or more stub definitions for the same
26912691
function in a row, each decorated with @overload, followed
26922692
with an implementation. The implementation should *not*
26932693
be decorated with @overload::
@@ -2701,8 +2701,8 @@ def utf8(value: str) -> bytes: ...
27012701
def utf8(value):
27022702
... # implementation goes here
27032703
2704-
In a stub file or in a Protocol definition, the implementation
2705-
should be omitted::
2704+
In a stub file or in an abstract method (for example, in a Protocol definition),
2705+
the implementation may be omitted::
27062706
27072707
@overload
27082708
def utf8(value: None) -> None: ...
@@ -2711,7 +2711,6 @@ def utf8(value: bytes) -> bytes: ...
27112711
@overload
27122712
def utf8(value: str) -> bytes: ...
27132713
2714-
27152714
The overloads for a function can be retrieved at runtime using the
27162715
get_overloads() function.
27172716
"""

0 commit comments

Comments
 (0)