4
willol
8y

The ':' in Python. Seriously, what the fuck?? It's literally useless!

Comments
  • 0
    Didn't it send the sender as the first argument? Instead of other function calls in Python which require you to send the variable manually
  • 2
    @RexOmni mh we probably aren't talking about the same thing, in talking about the common at the end of if/while/def/class statements :)
  • 0
    @willol seems like it
  • 0
    @le717 indentation is here to define blocks. If we'd remove the colon from the language's grammar, nothing would change, there would be no trouble to know what's inside a if statement
  • 2
    @willol never thought about it. But now thanks to you, I'll hate everytime i write ':' in python
  • 0
    The colon does make it possible for Python wrappers and shells to know when to indent when writing code.
Add Comment