News for hackers. Stuff that matters.
Re:Python best practices by tdavis on Wednesday July 09, 2008 @03:25AM (#240890)
Always use 4 spaces as indent

My god how I wish everyone did this... would make life so much easier.

Re:Python best practices by bkovitz on Wednesday July 09, 2008 @06:17PM (#241749)
Awww, I like 3! 3 makes the tab levels very distinct, without wasting space. Of course it's just a matter of personal preference. But, is 4 really a widespread standard in the Python world?
Re:Python best practices by danohuiginn on Thursday July 10, 2008 @04:28AM (#242187)
"is 4 really a widespread standard in the Python world?" yes. http://www.python.org/dev/peps/pep-0008/
Re:Python best practices by bkovitz on Thursday July 10, 2008 @05:56AM (#242235)
I am so sad to see this. Thanks for posting it, though. Maybe I'll...ghhk..ekkk...switch. I went through the entire PEP and found that I'm following every other convention but two (multiple imports on one line, and I seldom write docstrings).
Re:Python best practices by spydez on Wednesday July 09, 2008 @02:13PM (#241462)
What's wrong with 3?

IMO, indent is personal preference, and as long as you're 100% consistent, and stay away from the devil-spawn tab character, you're ok.

Re:Python best practices by cheponis on Thursday July 10, 2008 @05:58AM (#242236)
I read a study that showed that 2,3, or 4-space indents were equivalent for readability. Therefore, I always use 2.