Linked by Eugenia Loli on Sat 15th Jul 2006 22:45 UTC
.NET (dotGNU too) Jeff Cogswell writes: "I'm about to make a confession. Even though I've written several books and articles about C++, I have a secret: C++ isn't my favorite language. I have lots of languages that I use, each one for different purposes. But the language I consider my all-time favorite is Python."
Thread beginning with comment 143862
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: Python is . . .
by CrLf on Mon 17th Jul 2006 14:01 UTC in reply to "RE[5]: Python is . . ."
CrLf
Member since:
2006-01-03

"Yes. But if you aren't doing the replacement consistently, you can end up with code that looks properly indented when displayed, but that the compiler treats as having different indentation than you think you see."

And why should I do that? There is only one reason that calls for "spaces->tabs" or "tabs->spaces" replacement: when one or the other is enforced in a particular project, and you want to add code that used the "wrong" indentation method.

Problems may come up when replacing inside aligned lines that continue statements (like splitting a "print" over multiple lines), and code may look aligned when it isn't. But Python doesn't care about indentation in split statements, so there is no problem there.

I also complained about indentation when I first started with Python, but soon realized that it is a non-issue. People can come up with multiple scenarios where problems could arise, but in practice they never do. I'm still waiting to hear about a real-world situation where indentation in python caused problems.

And to those stating that not using indentation is sometimes desirable... I don't want to look at your code... ever!

Reply Parent Score: 1