summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-06-11 17:51:17 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-06-11 17:51:17 (GMT)
commit3bca523a8c249cb244469e961790b6b56581f2d2 (patch)
tree216776c5befc510c0f2b5d5019c8596113d5a3d5 /Lib
parentb266481ed8dba9164b03e72bab9c19712b938657 (diff)
downloadcpython-3bca523a8c249cb244469e961790b6b56581f2d2.zip
cpython-3bca523a8c249cb244469e961790b6b56581f2d2.tar.gz
cpython-3bca523a8c249cb244469e961790b6b56581f2d2.tar.bz2
use multi-with syntax
Diffstat (limited to 'Lib')
-rw-r--r--Lib/filecmp.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index a2266d8..89a4835 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -11,7 +11,6 @@ Functions:
import os
import stat
-import contextlib
from itertools import ifilter, ifilterfalse, imap, izip
__all__ = ["cmp","dircmp","cmpfiles"]
@@ -63,7 +62,7 @@ def _sig(st):
def _do_cmp(f1, f2):
bufsize = BUFSIZE
- with contextlib.nested(open(f1, 'rb'), open(f2, 'rb')) as (fp1, fp2):
+ with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
while True:
b1 = fp1.read(bufsize)
b2 = fp2.read(bufsize)