Commit 55689c92 authored by Georg Brandl's avatar Georg Brandl

Use PEP 8 and true booleans.

parent eb5f27ec
...@@ -4,7 +4,7 @@ Classes: ...@@ -4,7 +4,7 @@ Classes:
dircmp dircmp
Functions: Functions:
cmp(f1, f2, shallow=1) -> int cmp(f1, f2, shallow=True) -> int
cmpfiles(a, b, common) -> ([], [], []) cmpfiles(a, b, common) -> ([], [], [])
""" """
...@@ -14,12 +14,12 @@ import stat ...@@ -14,12 +14,12 @@ import stat
import contextlib import contextlib
from itertools import filterfalse from itertools import filterfalse
__all__ = ["cmp","dircmp","cmpfiles"] __all__ = ["cmp", "dircmp", "cmpfiles"]
_cache = {} _cache = {}
BUFSIZE=8*1024 BUFSIZE = 8*1024
def cmp(f1, f2, shallow=1): def cmp(f1, f2, shallow=True):
"""Compare two files. """Compare two files.
Arguments: Arguments:
...@@ -77,7 +77,7 @@ def _do_cmp(f1, f2): ...@@ -77,7 +77,7 @@ def _do_cmp(f1, f2):
class dircmp: class dircmp:
"""A class that manages the comparison of 2 directories. """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. A and B are directories.
IGNORE is a list of names to ignore, IGNORE is a list of names to ignore,
defaults to ['RCS', 'CVS', 'tags']. defaults to ['RCS', 'CVS', 'tags'].
...@@ -238,7 +238,7 @@ class dircmp: ...@@ -238,7 +238,7 @@ class dircmp:
self.methodmap[attr](self) self.methodmap[attr](self)
return getattr(self, attr) return getattr(self, attr)
def cmpfiles(a, b, common, shallow=1): def cmpfiles(a, b, common, shallow=True):
"""Compare common files in two directories. """Compare common files in two directories.
a, b -- directory names a, b -- directory names
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment