4 ms·
Google mandates 4 space indentation according to this: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Indentation http://google-styleguide.googl
by tomlu 13y ago
Google mandates 4 space indentation according to this: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Indentation http://google-styleguide.googlecode.com/svn/trunk/pyguide.ht...
- chetanahuja 13y agoOh.. hmmm.. so this has changed since the (first and) last time I tried to get a piece of python code through a review at Google. Looks like better sense has prevailed finally. (There's a version number on that public document but as far as I see, no version history so I could tell when the change happened.)
- jamesgeck0 13y agoWayback Machine shows the document recommending 4 spaces when it was first released in 2009.
- chetanahuja 13y agoLooks like the google's external style guide is saner than the internal one :-) I was talking about the internal style. I can't even begin the fathom the reasoning for the internal style.
- estebank 13y agoI think 4 spaces is for public code and 2 spaces for internal code. FWIW, I got used to 2 spaces quickly enough, and now it doesn't bother me using either 2 or 4, other than sometimes forgetting to change the setting on vim when changing between projects.
- packetslave 13y agoYeah, there are some minor differences between the internal and external style guides. Tab width is one of them (it's 2 spaces internally)
- cocoflunchy 13y agoWeird, because the whole Google App Engine source uses 2 space indents.