Code: Select all
def mogrify(a: int) -> bool:
return bool(a)
def stream(b: int, f: Callable[[int], bool]) -> bool:
return f(b)
etwas tun wie:
Code: Select all
MyCallback = reveal_type(mogrify)
def stream(b: int, f: MyCallback) -> bool:
return f(b)
von PEP 484, also kann ich das nicht verwenden.