Alex Waygood <alex.wayg...@gmail.com> added the comment:
There is a similar issue with `functools.singledispatch` ``` >>> from functools import singledispatch >>> @singledispatch ... def flip(x: str) -> int: ... """Signature when given a string""" ... return int(x) ... >>> @flip.register ... def _(x: int) -> str: ... """Signature when given an int""" ... return str(x) ... >>> flip(5) '5' >>> flip('5') 5 >>> help(flip) Help on function flip in module __main__: flip(x: str) -> int Signature when given a string ``` ---------- nosy: +AlexWaygood _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com