# Why is so much Python code incorrectly indented

In this thread all of the Python code is not indented, making it hard to read.

Is there some way to fix this? I see it quite a bit at stackoverflow.

-
Why? Because the person who posted the code didn't bother to indent it correctly. Yeah, that happens a lot - most new comers have no idea about formatting. – Oded Nov 27 '12 at 19:45
I see indentations... Is there a specific spot where it's missing? – animuson Nov 27 '12 at 19:45
What browser are you using and which version? IE7 perhaps? – Bart Nov 27 '12 at 19:57
Would it be possible to auto-indent Python(java etc)? A good future idea!!! – Adel Nov 27 '12 at 20:30
@Adel: I don't think it would be possible to auto-indent Python. Indentation is how structure is indicated in Python (the way C uses { and }). If the indentation is missing, there's no reliable way to recreate it. – Keith Thompson Nov 28 '12 at 4:12
I'm using IE6 (corporate choice, not mine!) – Terrence Brannon Nov 28 '12 at 15:42
Related: StackOverflow seems to use 4-column tabs, while many non-Windows editors use 8. Users often post code they think is properly formatted, only to have it come out all wrong. (FWIW, the official Java standard says use 8). It's especially confusing because the editor (at least in my browser) uses 8-column tabs, even though SO then displays with 4-column. When I edit a post, I just convert to spaces to eliminate the confusion. – Edward Falk May 22 '13 at 0:08