Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hm, while the python style guide is interesting and contains good advices, I am missing a reference to PEP8.


Speaking of PEP8, I find it strange that the guide mentions "Indent your code blocks with 4 spaces.". AFAIK Google used 2 spaces for indentation.


Unless I'm crazy, we still do. These guides differ from the internal guides in various strange ways.

I'm pretty sure these are the coding standards for code released outside of Google. For various disgusting historical reasons Python written internally spits in the face of PEP8 naming conventions. (And other weird niggles.)


They use 2 spaces for C++ and ObjC, 4 spaces for Python.


I was talking about the previous standard. Here's a proof: http://code.google.com/p/soc/wiki/PythonStyleGuide#Indentati.... It says:

Note that this differs from PEP8 and instead follows the original Google Python Style guide from which this style guide originated.

Indent your code blocks with 2 spaces.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: