About 3 weeks ago, Leo Laporte and I recorded the first episode of what
will be a new monthly show on the TWiT network. Naming things is hard, and
we alm...
Monday, September 24, 2012
Python, Indentation, and Eclipse
I'm noticing that many of you are not being careful about consistent indentation. In Python, indentation is code. So, while the program might work if the then-part of an if-else is over-indented, this will cause problems later on when you add more code.
Also, don't use tabs! You can tell eclipse to only use spaces (instead of tabs) by going to Preferences, as shown in the images.
Labels:
opinion
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment