非浅文件cmp.cmp具体做什么?

2024-06-06 13:19:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是Python2.6.2。docs for the filecmp module说:

The filecmp module defines functions to compare files and directories, with various optional time/correctness trade-offs.

以及,对于filecmp.cmp函数:

filecmp.cmp(f1, f2[, shallow])

Compare the files named f1 and f2, returning True if they seem equal, False otherwise.

Unless shallow is given and is false, files with identical os.stat() signatures are taken to be equal.

他们不做的是指定用shallow=False获得的正确性级别。那么,shallow=False做什么呢?有多正确?


Tags: andthetofalsedocsiswithfiles