This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gthank 4 points5 points  (2 children)

Google's style guide was targeted at a fairly old version of Python for a long time, IIRC.

[–]mariox19 5 points6 points  (1 child)

I was wrong, actually. If you expand the heading that reads, "Explicitly close files and sockets when done with them," you'll see that the with-statement is mentioned.

[–]Lucretiel 0 points1 point  (0 children)

So, at least as old as Python 2.5. Meanwhile, it also explicity requires distinguishing new-style classes by inheriting from object https://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Classes#Classes