Comment by kccqzy
6 hours ago
They are originally magic comments, unformalized. The feature is originally known as annotations and you can basically put anything there.
def f(a: "something like an int", b: "another int-like thing"): pass
def g(a: sys.stdin, b: sys.stderr): pass
No comments yet
Contribute on Hacker News ↗