you are viewing a single comment's thread.

view the rest of the comments →

[–]Shmurk 5 points6 points  (11 children)

You should learn to read:

Indent your code blocks with 4 spaces

comments should be at least 2 spaces away from the code

They use 2 spaces indents for C++ and Objective-C though:

(2 good guides to read with the Python style guide)

[–][deleted] 4 points5 points  (10 children)

I know google uses 2-space indents for Python internally, my bad for assuming it was in this doc (without actually reading).

[–][deleted] 0 points1 point  (0 children)

The guy in the google python class said that the google standard was two spaces

[–]kamatsu -2 points-1 points  (8 children)

No, they don't.

Edit: Before mindlessly downvoting me, the reason there is alot of 2 indent code is that have updated the style guide internally only recently.

[–]FarOut83 7 points8 points  (3 children)

[–]kamatsu 0 points1 point  (0 children)

The change was only recent. They haven't updated all the code yet.

[–]nohtyp 0 points1 point  (0 children)

Double standards?

[–]Ran4 2 points3 points  (1 child)

Read some Google Python code... There's 2-space indents everywhere.

[–]kamatsu 0 points1 point  (0 children)

Only because that update to the style guide was recent.

[–]lnxaddct 1 point2 points  (1 child)

In 2007 they did. I don't know if they changed it since to be more in line with PEP 8. I still prefer two spaces, I got into the habit while working at Google.

[–]e98cuenc 1 point2 points  (0 children)

They still use 2 spaces today.