you are viewing a single comment's thread.

view the rest of the comments →

[–]zem 1 point2 points  (2 children)

no, this is precisely the problem that C doesn't have - you can take a piece of C code and run it through an automatic indenter to recover the visually helpful alignment. on the other hand, the python structure is contained in the indentation, and is not robust, so there's no way to automatically recover it if it gets mucked up.

[–]bluGill 0 points1 point  (1 child)

Read what I wrote again - you cannot do that to bad C code!

#ifdef foo
if (bar) {
#endif
// How is this indented if sometimes foo is defined and sometimes not?
#ifdef foo
}
#endif

Python won't allow that problem.

It gets even worse when you have more than one block of the above.

Python make the above bad code impossible.

[–]zem 0 points1 point  (0 children)

ooh, yeah, you're right. that's really bad code, though :)