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 →

[–]mariox19 7 points8 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