Hacker News new | ask | show | jobs
by skrishnamurthi 3476 days ago
You're right! To DEFine a FUNction, you should naturally type `def`, not `fun`. By the way, I tried to define a variable and got

  >>> def x = 3
    File "<stdin>", line 1
      def x = 3
            ^
  SyntaxError: invalid syntax
What's up with that? Is that not also a DEFinition?
1 comments

Yeah, that should work (well, "def x: 3" should work). In my preferred language it does work.