@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.9\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2021-01-01 05:02 +0000\n "
14+ "POT-Creation-Date : 2021-08-05 07:09 +0000\n "
1515"PO-Revision-Date : 2017-02-16 23:10+0000\n "
1616"
Last-Translator :
胡谷歌 <[email protected] >, 2019\n "
1717"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -50,17 +50,24 @@ msgstr "比较名为 *f1* 和 *f2* 的文件,如果它们似乎相等则返回
5050
5151#: ../../library/filecmp.rst:25
5252msgid ""
53- "If *shallow* is true, files with identical :func:`os.stat` signatures are "
54- "taken to be equal. Otherwise, the contents of the files are compared."
55- msgstr "如果 *shallow* 为真,那么具有相同 :func:`os.stat` 签名的文件将会被认为是相等的。否则,将比较文件的内容。"
53+ "If *shallow* is true and the :func:`os.stat` signatures (file type, size, "
54+ "and modification time) of both files are identical, the files are taken to "
55+ "be equal."
56+ msgstr ""
57+
58+ #: ../../library/filecmp.rst:29
59+ msgid ""
60+ "Otherwise, the files are treated as different if their sizes or contents "
61+ "differ."
62+ msgstr ""
5663
57- #: ../../library/filecmp.rst:28
64+ #: ../../library/filecmp.rst:31
5865msgid ""
5966"Note that no external programs are called from this function, giving it "
6067"portability and efficiency."
6168msgstr "需要注意,没有外部程序被该函数调用,这赋予了该函数可移植性与效率。"
6269
63- #: ../../library/filecmp.rst:31
70+ #: ../../library/filecmp.rst:34
6471msgid ""
6572"This function uses a cache for past comparisons and the results, with cache "
6673"entries invalidated if the :func:`os.stat` information for the file changes."
@@ -69,13 +76,13 @@ msgstr ""
6976"该函数会缓存过去的比较及其结果,且在文件的 :func:`os.stat` 信息变化后缓存条目失效。所有的缓存可以通过 "
7077":func:`clear_cache` 清除。"
7178
72- #: ../../library/filecmp.rst:38
79+ #: ../../library/filecmp.rst:41
7380msgid ""
7481"Compare the files in the two directories *dir1* and *dir2* whose names are "
7582"given by *common*."
7683msgstr "比较在两个目录 *dir1* 和 *dir2* 中,由 *common* 所确定名称的文件。"
7784
78- #: ../../library/filecmp.rst:41
85+ #: ../../library/filecmp.rst:44
7986msgid ""
8087"Returns three lists of file names: *match*, *mismatch*, *errors*. *match* "
8188"contains the list of files that match, *mismatch* contains the names of "
@@ -89,13 +96,13 @@ msgstr ""
8996"列出那些未被比较文件的名称。如果文件不存在于两目录中的任一个,或者用户缺少读取它们的权限,又或者因为其他的一些原因而无法比较,那么这些文件将会被列在 "
9097"*errors* 中。"
9198
92- #: ../../library/filecmp.rst:48
99+ #: ../../library/filecmp.rst:51
93100msgid ""
94101"The *shallow* parameter has the same meaning and default value as for "
95102":func:`filecmp.cmp`."
96103msgstr "参数 *shallow* 具有同 :func:`filecmp.cmp` 一致的含义与默认值。"
97104
98- #: ../../library/filecmp.rst:51
105+ #: ../../library/filecmp.rst:54
99106msgid ""
100107"For example, ``cmpfiles('a', 'b', ['c', 'd/e'])`` will compare ``a/c`` with "
101108"``b/c`` and ``a/d/e`` with ``b/d/e``. ``'c'`` and ``'d/e'`` will each be in"
@@ -104,18 +111,18 @@ msgstr ""
104111"例如, ``cmpfiles('a', 'b', ['c', 'd/e'])`` 将会比较 ``a/c`` 与 ``b/c`` 以及 ``a/d/e``"
105112" 与 ``b/d/e`` 。 ``'c'`` 和 ``'d/e'`` 将会各自出现在返回的三个列表里的某一个列表中。"
106113
107- #: ../../library/filecmp.rst:58
114+ #: ../../library/filecmp.rst:61
108115msgid ""
109116"Clear the filecmp cache. This may be useful if a file is compared so quickly"
110117" after it is modified that it is within the mtime resolution of the "
111118"underlying filesystem."
112119msgstr "清除 filecmp 缓存。如果一个文件过快地修改,以至于超过底层文件系统记录修改时间的精度,那么该函数可能有助于比较该类文件。"
113120
114- #: ../../library/filecmp.rst:68
121+ #: ../../library/filecmp.rst:71
115122msgid "The :class:`dircmp` class"
116123msgstr ":class:`dircmp` 类"
117124
118- #: ../../library/filecmp.rst:72
125+ #: ../../library/filecmp.rst:75
119126msgid ""
120127"Construct a new directory comparison object, to compare the directories *a* "
121128"and *b*. *ignore* is a list of names to ignore, and defaults to "
@@ -126,115 +133,115 @@ msgstr ""
126133":attr:`filecmp.DEFAULT_IGNORES` 。 *hide* 是需要隐藏的文件名列表,且默认为 ``[os.curdir, "
127134"os.pardir]`` 。"
128135
129- #: ../../library/filecmp.rst:77
136+ #: ../../library/filecmp.rst:80
130137msgid ""
131138"The :class:`dircmp` class compares files by doing *shallow* comparisons as "
132139"described for :func:`filecmp.cmp`."
133140msgstr ":class:`dircmp` 类如 :func:`filecmp.cmp` 中所描述的那样对文件进行 *shallow* 比较。"
134141
135- #: ../../library/filecmp.rst:80
142+ #: ../../library/filecmp.rst:83
136143msgid "The :class:`dircmp` class provides the following methods:"
137144msgstr ":class:`dircmp` 类提供以下方法:"
138145
139- #: ../../library/filecmp.rst:84
146+ #: ../../library/filecmp.rst:87
140147msgid "Print (to :data:`sys.stdout`) a comparison between *a* and *b*."
141148msgstr "将 *a* 与 *b* 之间的比较打印(到 :data:`sys.stdout` )。"
142149
143- #: ../../library/filecmp.rst:88
150+ #: ../../library/filecmp.rst:91
144151msgid ""
145152"Print a comparison between *a* and *b* and common immediate subdirectories."
146153msgstr "打印 *a* 与 *b* 及共同直接子目录的比较结果。"
147154
148- #: ../../library/filecmp.rst:93
155+ #: ../../library/filecmp.rst:96
149156msgid ""
150157"Print a comparison between *a* and *b* and common subdirectories "
151158"(recursively)."
152159msgstr "打印 *a* 与 *b* 及共同子目录比较结果(递归地)。"
153160
154- #: ../../library/filecmp.rst:96
161+ #: ../../library/filecmp.rst:99
155162msgid ""
156163"The :class:`dircmp` class offers a number of interesting attributes that may"
157164" be used to get various bits of information about the directory trees being "
158165"compared."
159166msgstr ":class:`dircmp` 类提供了一些有趣的属性,用以得到关于参与比较的目录树的各种信息。"
160167
161- #: ../../library/filecmp.rst:100
168+ #: ../../library/filecmp.rst:103
162169msgid ""
163170"Note that via :meth:`__getattr__` hooks, all attributes are computed lazily,"
164171" so there is no speed penalty if only those attributes which are lightweight"
165172" to compute are used."
166173msgstr ""
167174"需要注意,通过 :meth:`__getattr__` 钩子,所有的属性将会惰性求值,因此如果只使用那些计算简便的属性,将不会有速度损失。"
168175
169- #: ../../library/filecmp.rst:107
176+ #: ../../library/filecmp.rst:110
170177msgid "The directory *a*."
171178msgstr "目录 *a* 。"
172179
173- #: ../../library/filecmp.rst:112
180+ #: ../../library/filecmp.rst:115
174181msgid "The directory *b*."
175182msgstr "目录 *b* 。"
176183
177- #: ../../library/filecmp.rst:117
184+ #: ../../library/filecmp.rst:120
178185msgid "Files and subdirectories in *a*, filtered by *hide* and *ignore*."
179186msgstr "经 *hide* 和 *ignore* 过滤,目录 *a* 中的文件与子目录。"
180187
181- #: ../../library/filecmp.rst:122
188+ #: ../../library/filecmp.rst:125
182189msgid "Files and subdirectories in *b*, filtered by *hide* and *ignore*."
183190msgstr "经 *hide* 和 *ignore* 过滤,目录 *b* 中的文件与子目录。"
184191
185- #: ../../library/filecmp.rst:127
192+ #: ../../library/filecmp.rst:130
186193msgid "Files and subdirectories in both *a* and *b*."
187194msgstr "同时存在于目录 *a* 和 *b* 中的文件和子目录。"
188195
189- #: ../../library/filecmp.rst:132
196+ #: ../../library/filecmp.rst:135
190197msgid "Files and subdirectories only in *a*."
191198msgstr "仅在目录 *a* 中的文件和子目录。"
192199
193- #: ../../library/filecmp.rst:137
200+ #: ../../library/filecmp.rst:140
194201msgid "Files and subdirectories only in *b*."
195202msgstr "仅在目录 *b* 中的文件和子目录。"
196203
197- #: ../../library/filecmp.rst:142
204+ #: ../../library/filecmp.rst:145
198205msgid "Subdirectories in both *a* and *b*."
199206msgstr "同时存在于目录 *a* 和 *b* 中的子目录。"
200207
201- #: ../../library/filecmp.rst:147
208+ #: ../../library/filecmp.rst:150
202209msgid "Files in both *a* and *b*."
203210msgstr "同时存在于目录 *a* 和 *b* 中的文件。"
204211
205- #: ../../library/filecmp.rst:152
212+ #: ../../library/filecmp.rst:155
206213msgid ""
207214"Names in both *a* and *b*, such that the type differs between the "
208215"directories, or names for which :func:`os.stat` reports an error."
209216msgstr "在目录 *a* 和 *b* 中类型不同的名字,或者那些 :func:`os.stat` 报告错误的名字。"
210217
211- #: ../../library/filecmp.rst:158
218+ #: ../../library/filecmp.rst:161
212219msgid ""
213220"Files which are identical in both *a* and *b*, using the class's file "
214221"comparison operator."
215222msgstr "在目录 *a* 和 *b* 中使用类的文件比较操作符相等的文件。"
216223
217- #: ../../library/filecmp.rst:164
224+ #: ../../library/filecmp.rst:167
218225msgid ""
219226"Files which are in both *a* and *b*, whose contents differ according to the "
220227"class's file comparison operator."
221228msgstr "在目录 *a* 和 *b* 中,根据类的文件比较操作符判定内容不等的文件。"
222229
223- #: ../../library/filecmp.rst:170
230+ #: ../../library/filecmp.rst:173
224231msgid "Files which are in both *a* and *b*, but could not be compared."
225232msgstr "在目录 *a* 和 *b* 中无法比较的文件。"
226233
227- #: ../../library/filecmp.rst:175
234+ #: ../../library/filecmp.rst:178
228235msgid ""
229236"A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` "
230237"objects."
231238msgstr "一个将 :attr:`common_dirs` 中名称映射为 :class:`dircmp` 对象的字典。"
232239
233- #: ../../library/filecmp.rst:182
240+ #: ../../library/filecmp.rst:185
234241msgid "List of directories ignored by :class:`dircmp` by default."
235242msgstr "默认被 :class:`dircmp` 忽略的目录列表。"
236243
237- #: ../../library/filecmp.rst:185
244+ #: ../../library/filecmp.rst:188
238245msgid ""
239246"Here is a simplified example of using the ``subdirs`` attribute to search "
240247"recursively through two directories to show common different files::"
0 commit comments