diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-04-04 22:55:58 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-04-04 22:55:58 +0000 |
commit | 6466fec7b159fc14149632409a49b3ff86d011a8 (patch) | |
tree | ecdc70d76cc98d27bc305966884c5e269f15fdb0 /Lib/filecmp.py | |
parent | f4c58160823a30ddfac1b2565ff8a57edfaf31e1 (diff) | |
download | cpython-6466fec7b159fc14149632409a49b3ff86d011a8.tar.gz |
Convert a pile of obvious "yes/no" functions to return bool.
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r-- | Lib/filecmp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py index 3018762003..f0e6d47bc3 100644 --- a/Lib/filecmp.py +++ b/Lib/filecmp.py @@ -35,7 +35,7 @@ def cmp(f1, f2, shallow=1, use_statcache=0): Return value: - integer -- 1 if the files are the same, 0 otherwise. + True if the files are the same, False otherwise. This function uses a cache for past comparisons and the results, with a cache invalidation mechanism relying on stale signatures. @@ -50,11 +50,11 @@ def cmp(f1, f2, shallow=1, use_statcache=0): s1 = _sig(stat_function(f1)) s2 = _sig(stat_function(f2)) if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG: - return 0 + return False if shallow and s1 == s2: - return 1 + return True if s1[1] != s2[1]: - return 0 + return False result = _cache.get((f1, f2)) if result and (s1, s2) == result[:2]: |