Index: Doc/tutorial/stdlib2.rst =================================================================== --- Doc/tutorial/stdlib2.rst (revision 86561) +++ Doc/tutorial/stdlib2.rst (working copy) @@ -141,7 +141,9 @@ import struct - data = open('myfile.zip', 'rb').read() + with open('myfile.zip', 'rb') as f: + data = f.read() + start = 0 for i in range(3): # show the first 3 file headers start += 14