This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author uriyyo
Recipients chaim422, uriyyo
Date 2021-01-03.11:53:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609674789.93.0.0707728209379.issue42812@roundup.psfhosted.org>
In-reply-to
Content
The purpose of `@overload` is quite different. I believe you thought that this is smth like `@override` in Java world but it different.

Basically, the correct usage of `@overaload` is:
```
@overload
def process(response: None) -> None:
    ...
@overload
def process(response: int) -> tuple[int, str]:
    ...
@overload
def process(response: bytes) -> str:
    ...
def process(response):
    <actual implementation>
```

Please, follow this link for more information https://docs.python.org/3/library/typing.html#typing.overload
History
Date User Action Args
2021-01-03 11:53:09uriyyosetrecipients: + uriyyo, chaim422
2021-01-03 11:53:09uriyyosetmessageid: <1609674789.93.0.0707728209379.issue42812@roundup.psfhosted.org>
2021-01-03 11:53:09uriyyolinkissue42812 messages
2021-01-03 11:53:09uriyyocreate