Message384265
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 |
|
Date |
User |
Action |
Args |
2021-01-03 11:53:09 | uriyyo | set | recipients:
+ uriyyo, chaim422 |
2021-01-03 11:53:09 | uriyyo | set | messageid: <1609674789.93.0.0707728209379.issue42812@roundup.psfhosted.org> |
2021-01-03 11:53:09 | uriyyo | link | issue42812 messages |
2021-01-03 11:53:09 | uriyyo | create | |
|