[Python-checkins] r72740 - python/branches/py3k/Lib/filecmp.py
georg.brandl
python-checkins at python.org
Sun May 17 14:19:44 CEST 2009
Author: georg.brandl
Date: Sun May 17 14:19:44 2009
New Revision: 72740
Log:
Use PEP 8 and true booleans.
Modified:
python/branches/py3k/Lib/filecmp.py
Modified: python/branches/py3k/Lib/filecmp.py
==============================================================================
--- python/branches/py3k/Lib/filecmp.py (original)
+++ python/branches/py3k/Lib/filecmp.py Sun May 17 14:19:44 2009
@@ -4,7 +4,7 @@
dircmp
Functions:
- cmp(f1, f2, shallow=1) -> int
+ cmp(f1, f2, shallow=True) -> int
cmpfiles(a, b, common) -> ([], [], [])
"""
@@ -14,12 +14,12 @@
import contextlib
from itertools import filterfalse
-__all__ = ["cmp","dircmp","cmpfiles"]
+__all__ = ["cmp", "dircmp", "cmpfiles"]
_cache = {}
-BUFSIZE=8*1024
+BUFSIZE = 8*1024
-def cmp(f1, f2, shallow=1):
+def cmp(f1, f2, shallow=True):
"""Compare two files.
Arguments:
@@ -77,7 +77,7 @@
class dircmp:
"""A class that manages the comparison of 2 directories.
- dircmp(a,b,ignore=None,hide=None)
+ dircmp(a, b, ignore=None, hide=None)
A and B are directories.
IGNORE is a list of names to ignore,
defaults to ['RCS', 'CVS', 'tags'].
@@ -238,7 +238,7 @@
self.methodmap[attr](self)
return getattr(self, attr)
-def cmpfiles(a, b, common, shallow=1):
+def cmpfiles(a, b, common, shallow=True):
"""Compare common files in two directories.
a, b -- directory names
More information about the Python-checkins
mailing list