News for hackers. Stuff that matters.
Re:Exhaustiveness Checking with Mypy by MapleWalnut on Tuesday December 15, 2020 @10:03AM (#25430896)
You can use typing.TypeVar for the `pow()` example. TypeVar was added via the original type hints PEP in 2014.

    from typing import TypeVar

    T = TypeVar('T', int, float)
    def pow(base: T, power: T) -> T: ...

There are no comments on this comment yet.