def f() -> 0: f.__annotations__["return"] += 1 print(f"f() has been executed {f.__annotations__['return']} time(s)") f() f() f()