I recently found a Post on Google Plus from Codelect.net that only a programmer would love:
Of course this is an endless debate of where to put the braces of a block of code. C, C++, Java, JavaScript, Objective-C and even CSS uses those lovely curly braces.
Python does something totally mind tripping to me: it doesn’t use them. Here’s the same if statement in Python:
if condition: Statements #a comment ...
In Python there is no braces:only white space. By convention there are four spaces. When there is no more indent, no more block.
Of course I do a lot of indentation in Xcode. But that is just documentation. In Python it’s syntax — and you can nest them too!
Another thing for me to swallow.
Leave a Reply