Yurii Karabas <1998uri...@gmail.com> added the comment:
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 ---------- nosy: +uriyyo _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42812> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com