Discussion: Python indentation sucks?

By | January 16, 2011

In my previous post I borrowed some python code from a web page which does web cam face recognition. However the guy who pasted the code to the page has lost all the indentation. Now if you know python you should know that incorrect indentation will make python very upset. So the code that I borrowed was pretty much useless until I read through the code and put the correct indentation back.

What if python understand braces/brackets, I could have simply paste that code into netbeans or any decent IDE and auto format, like 1 sec job.

Just my $0.02

4 thoughts on “Discussion: Python indentation sucks?

  1. Ha jhas

    I know this is old but…
    What if a C code pasted to a page loses all its braces? Then you have to read line by line to figure it out. The problem is not with python but with using tools which treats blank characters differently from other characters like ‘{‘ ‘}’.

    Reply
    1. james_lin Post author

      You are not making the point here, you are saying like what if pasted C code loses all its symbols.

      Reply
  2. Darn Thing

    Ha jhas… WTF? how the hell a piece of C code could lose their brackets in a copy paste?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *