Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by kccqzy

8 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

0 comments

kccqzy

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities