Categories
Uncategorized

Python Indentation

I like Python’s notion of using indentation instead of braces. All it does is force you to be consistent with yourself. Not a big deal, and it produces very reasonable code. I was very amused to see this however:

  % python
  Python 2.4.3 (#2, Mar 31 2006, 09:12:16)
  [GCC 3.4.4 [FreeBSD] 20050518] on freebsd6
  Type "help", "copyright", "credits" or "license" for more information.
  >>> from __future__ import braces
    File "<stdin>", line 1
  SyntaxError: not a chance
  >>>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s