On 11/19/10 4:18 PM, Nimret Sandhu wrote:
python uses indentation for scoping ( thus ending the argument about whether starting braces should be on the same line or the next line). the key thing to remember is to use the same scheme for indentation throughout your file ( or terminal session). You can use 1, 2, 3, 4, etc spaces or tabs BUT you have to remember to use the same scheme throughout your code ( file or session). 2 or 4 spaces work pretty well and it's good to be consisten.
Good point. That's why it is very important that your editor do Python indenting well.
BBedit does not do it well. IN fact, a few years back, someone lobbied them to improve that in their python mode, and they refused, essentially saying: you shouldn't want that.
When I do use TextWrangler (I haven't had a BBedit license in years), I keep getting things messed up with tabs.
Peppy is the only editor I've seen that does indentation as well as Emacs python mode -- there may well be others, but a lot of editors don't do it well.
-Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected]
