Loading docs/topics/files.txt +3 −3 Original line number Diff line number Diff line Loading @@ -87,9 +87,9 @@ The following approach may be used to close files automatically:: # Create a Python file object using open() and the with statement >>> with open('/tmp/hello.world', 'w') as f: >>> myfile = File(f) >>> for line in myfile: >>> print line ... myfile = File(f) ... myfile.write('Hello World') ... >>> myfile.closed True >>> f.closed Loading Loading
docs/topics/files.txt +3 −3 Original line number Diff line number Diff line Loading @@ -87,9 +87,9 @@ The following approach may be used to close files automatically:: # Create a Python file object using open() and the with statement >>> with open('/tmp/hello.world', 'w') as f: >>> myfile = File(f) >>> for line in myfile: >>> print line ... myfile = File(f) ... myfile.write('Hello World') ... >>> myfile.closed True >>> f.closed Loading