5 ms·
Yeah, but this is best used for abstract methods or type stubs. I think in 'real code' you would want to raise NotImplementedError, or even (if you use mypy) po
by staticassertion 5y ago
Yeah, but this is best used for abstract methods or type stubs. I think in 'real code' you would want to raise NotImplementedError, or even (if you use mypy) potentially return a NoReturn
ie:
from typing import Any, NoReturn
def foo(bar: Any, baz: Any) -> NoReturn:
raise NotImplementedError