Pythonistas Rejoice! Curly Braces Are In 1

Posted by Jack Hsu Wed, 01 Apr 2009 16:09:00 GMT

Finally, we can do without the annoying "whitespace is signigicant" crap. You can import a new feature called braces from the __future__ module. For those who don’t know, the __future__ module contains new features that are not yet included in the current Python version.

Now, instead of doing this:

def foo():
    # Ugh, I hate whitespace indents
    print 'Hello Braces!'

You can do this:

from __future__ import braces
def foo() { print 'Hello Braces!' } # Only one line!!!11!!11

April Fools!

Bookmark and Share
Comments

Leave a comment

  1. Avatar
    Greg said 8 days later:

    Whitespace indenting equates to consistent, readable code. It’s one of the things I like most about Python. Curly braces are the devil’s spawn.

(leave url/email »)

   Comment Markup Help Preview comment