[Python-checkins] r73363 - python/trunk/Lib/filecmp.py
benjamin.peterson
python-checkins at python.org
Thu Jun 11 19:51:17 CEST 2009
Author: benjamin.peterson
Date: Thu Jun 11 19:51:17 2009
New Revision: 73363
Log:
use multi-with syntax
Modified:
python/trunk/Lib/filecmp.py
Modified: python/trunk/Lib/filecmp.py
==============================================================================
--- python/trunk/Lib/filecmp.py (original)
+++ python/trunk/Lib/filecmp.py Thu Jun 11 19:51:17 2009
@@ -11,7 +11,6 @@
import os
import stat
-import contextlib
from itertools import ifilter, ifilterfalse, imap, izip
__all__ = ["cmp","dircmp","cmpfiles"]
@@ -63,7 +62,7 @@
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)
More information about the Python-checkins
mailing list