Python: Myths about Indentation

September 26, 2007 § Leave a comment

I got this from my friend, and he got it somewhere from GVR blog.

This article is an attempt to dismiss those who exercise FUD towards Python’s indentation.

Below is the summary that I compiled for readers:

Whitespace is significant in Python source code.

Response: No, not really. Only the most-left white space.

Python forces me to use certain indentation style.

Response: If you use new line for your block of code, yes that’s true. That’s because the indentation is explicitly enforcing the block structure.

You cannot safely mixed Tab or Spaces in Python.

Response: C also has the same problem, and most modern IDE will choose one or another anyway.

I just don’t like it.

Response: Whatever…

How does the compiler parses the indentation anyway?

Response: You have to read the main article. It’s fairly simple & well-defined.


The article


Leave a Reply

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

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

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s

What’s this?

You are currently reading Python: Myths about Indentation at RAPD.


%d bloggers like this: