[Python-checkins] cpython (merge 3.3 -> default): Merge with 3.3

terry.reedy python-checkins at python.org
Mon May 13 22:17:12 CEST 2013


http://hg.python.org/cpython/rev/2368f6f9963f
changeset:   83764:2368f6f9963f
parent:      83762:eeb89ebfa9b6
parent:      83763:c1383ddf7cb9
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Mon May 13 16:09:47 2013 -0400
summary:
  Merge with 3.3

files:
  Lib/idlelib/textView.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/idlelib/textView.py b/Lib/idlelib/textView.py
--- a/Lib/idlelib/textView.py
+++ b/Lib/idlelib/textView.py
@@ -80,7 +80,8 @@
     root=Tk()
     root.title('textView test')
     filename = './textView.py'
-    text = open(filename, 'r').read()
+    with open(filename, 'r') as f:
+        text = f.read()
     btn1 = Button(root, text='view_text',
                   command=lambda:view_text(root, 'view_text', text))
     btn1.pack(side=LEFT)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list