@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version : Python 3.10\n "
1414"Report-Msgid-Bugs-To : \n "
15- "POT-Creation-Date : 2021-06-29 12:56 +0000\n "
15+ "POT-Creation-Date : 2021-08-05 13:13 +0000\n "
1616"PO-Revision-Date : 2021-06-28 01:06+0000\n "
1717"
Last-Translator :
Freesand Leo <[email protected] >, 2021\n "
1818"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -51,17 +51,24 @@ msgstr "比较名为 *f1* 和 *f2* 的文件,如果它们似乎相等则返回
5151
5252#: ../../library/filecmp.rst:25
5353msgid ""
54- "If *shallow* is true, files with identical :func:`os.stat` signatures are "
55- "taken to be equal. Otherwise, the contents of the files are compared."
56- msgstr "如果 *shallow* 为真,那么具有相同 :func:`os.stat` 签名的文件将会被认为是相等的。否则,将比较文件的内容。"
54+ "If *shallow* is true and the :func:`os.stat` signatures (file type, size, "
55+ "and modification time) of both files are identical, the files are taken to "
56+ "be equal."
57+ msgstr ""
58+
59+ #: ../../library/filecmp.rst:29
60+ msgid ""
61+ "Otherwise, the files are treated as different if their sizes or contents "
62+ "differ."
63+ msgstr ""
5764
58- #: ../../library/filecmp.rst:28
65+ #: ../../library/filecmp.rst:31
5966msgid ""
6067"Note that no external programs are called from this function, giving it "
6168"portability and efficiency."
6269msgstr "需要注意,没有外部程序被该函数调用,这赋予了该函数可移植性与效率。"
6370
64- #: ../../library/filecmp.rst:31
71+ #: ../../library/filecmp.rst:34
6572msgid ""
6673"This function uses a cache for past comparisons and the results, with cache "
6774"entries invalidated if the :func:`os.stat` information for the file changes."
@@ -70,13 +77,13 @@ msgstr ""
7077"该函数会缓存过去的比较及其结果,且在文件的 :func:`os.stat` 信息变化后缓存条目失效。所有的缓存可以通过使用 "
7178":func:`clear_cache` 来清除。"
7279
73- #: ../../library/filecmp.rst:38
80+ #: ../../library/filecmp.rst:41
7481msgid ""
7582"Compare the files in the two directories *dir1* and *dir2* whose names are "
7683"given by *common*."
7784msgstr "比较在两个目录 *dir1* 和 *dir2* 中,由 *common* 所确定名称的文件。"
7885
79- #: ../../library/filecmp.rst:41
86+ #: ../../library/filecmp.rst:44
8087msgid ""
8188"Returns three lists of file names: *match*, *mismatch*, *errors*. *match* "
8289"contains the list of files that match, *mismatch* contains the names of "
@@ -90,13 +97,13 @@ msgstr ""
9097"列出那些未被比较文件的名称。如果文件不存在于两目录中的任一个,或者用户缺少读取它们的权限,又或者因为其他的一些原因而无法比较,那么这些文件将会被列在 "
9198"*errors* 中。"
9299
93- #: ../../library/filecmp.rst:48
100+ #: ../../library/filecmp.rst:51
94101msgid ""
95102"The *shallow* parameter has the same meaning and default value as for "
96103":func:`filecmp.cmp`."
97104msgstr "参数 *shallow* 具有同 :func:`filecmp.cmp` 一致的含义与默认值。"
98105
99- #: ../../library/filecmp.rst:51
106+ #: ../../library/filecmp.rst:54
100107msgid ""
101108"For example, ``cmpfiles('a', 'b', ['c', 'd/e'])`` will compare ``a/c`` with "
102109"``b/c`` and ``a/d/e`` with ``b/d/e``. ``'c'`` and ``'d/e'`` will each be in"
@@ -105,18 +112,18 @@ msgstr ""
105112"例如, ``cmpfiles('a', 'b', ['c', 'd/e'])`` 将会比较 ``a/c`` 与 ``b/c`` 以及 ``a/d/e``"
106113" 与 ``b/d/e`` 。 ``'c'`` 和 ``'d/e'`` 将会各自出现在返回的三个列表里的某一个列表中。"
107114
108- #: ../../library/filecmp.rst:58
115+ #: ../../library/filecmp.rst:61
109116msgid ""
110117"Clear the filecmp cache. This may be useful if a file is compared so quickly"
111118" after it is modified that it is within the mtime resolution of the "
112119"underlying filesystem."
113120msgstr "清除 filecmp 缓存。如果一个文件过快地修改,以至于超过底层文件系统记录修改时间的精度,那么该函数可能有助于比较该类文件。"
114121
115- #: ../../library/filecmp.rst:68
122+ #: ../../library/filecmp.rst:71
116123msgid "The :class:`dircmp` class"
117124msgstr ":class:`dircmp` 类"
118125
119- #: ../../library/filecmp.rst:72
126+ #: ../../library/filecmp.rst:75
120127msgid ""
121128"Construct a new directory comparison object, to compare the directories *a* "
122129"and *b*. *ignore* is a list of names to ignore, and defaults to "
@@ -127,105 +134,105 @@ msgstr ""
127134":attr:`filecmp.DEFAULT_IGNORES` 。 *hide* 是需要隐藏的文件名列表,且默认为 ``[os.curdir, "
128135"os.pardir]`` 。"
129136
130- #: ../../library/filecmp.rst:77
137+ #: ../../library/filecmp.rst:80
131138msgid ""
132139"The :class:`dircmp` class compares files by doing *shallow* comparisons as "
133140"described for :func:`filecmp.cmp`."
134141msgstr ":class:`dircmp` 类如 :func:`filecmp.cmp` 中所描述的那样对文件进行 *shallow* 比较。"
135142
136- #: ../../library/filecmp.rst:80
143+ #: ../../library/filecmp.rst:83
137144msgid "The :class:`dircmp` class provides the following methods:"
138145msgstr ":class:`dircmp` 类提供以下方法:"
139146
140- #: ../../library/filecmp.rst:84
147+ #: ../../library/filecmp.rst:87
141148msgid "Print (to :data:`sys.stdout`) a comparison between *a* and *b*."
142149msgstr "将 *a* 与 *b* 之间的比较结果打印(到 :data:`sys.stdout` )。"
143150
144- #: ../../library/filecmp.rst:88
151+ #: ../../library/filecmp.rst:91
145152msgid ""
146153"Print a comparison between *a* and *b* and common immediate subdirectories."
147154msgstr "打印 *a* 与 *b* 及共同直接子目录的比较结果。"
148155
149- #: ../../library/filecmp.rst:93
156+ #: ../../library/filecmp.rst:96
150157msgid ""
151158"Print a comparison between *a* and *b* and common subdirectories "
152159"(recursively)."
153160msgstr "打印 *a* 与 *b* 及共同子目录比较结果(递归地)。"
154161
155- #: ../../library/filecmp.rst:96
162+ #: ../../library/filecmp.rst:99
156163msgid ""
157164"The :class:`dircmp` class offers a number of interesting attributes that may"
158165" be used to get various bits of information about the directory trees being "
159166"compared."
160167msgstr ":class:`dircmp` 类提供了一些有趣的属性,用以得到关于参与比较的目录树的各种信息。"
161168
162- #: ../../library/filecmp.rst:100
169+ #: ../../library/filecmp.rst:103
163170msgid ""
164171"Note that via :meth:`__getattr__` hooks, all attributes are computed lazily,"
165172" so there is no speed penalty if only those attributes which are lightweight"
166173" to compute are used."
167174msgstr ""
168175"需要注意,通过 :meth:`__getattr__` 钩子,所有的属性将会惰性求值,因此如果只使用那些计算简便的属性,将不会有速度损失。"
169176
170- #: ../../library/filecmp.rst:107
177+ #: ../../library/filecmp.rst:110
171178msgid "The directory *a*."
172179msgstr "目录 *a* 。"
173180
174- #: ../../library/filecmp.rst:112
181+ #: ../../library/filecmp.rst:115
175182msgid "The directory *b*."
176183msgstr "目录 *b* 。"
177184
178- #: ../../library/filecmp.rst:117
185+ #: ../../library/filecmp.rst:120
179186msgid "Files and subdirectories in *a*, filtered by *hide* and *ignore*."
180187msgstr "经 *hide* 和 *ignore* 过滤,目录 *a* 中的文件与子目录。"
181188
182- #: ../../library/filecmp.rst:122
189+ #: ../../library/filecmp.rst:125
183190msgid "Files and subdirectories in *b*, filtered by *hide* and *ignore*."
184191msgstr "经 *hide* 和 *ignore* 过滤,目录 *b* 中的文件与子目录。"
185192
186- #: ../../library/filecmp.rst:127
193+ #: ../../library/filecmp.rst:130
187194msgid "Files and subdirectories in both *a* and *b*."
188195msgstr "同时存在于目录 *a* 和 *b* 中的文件和子目录。"
189196
190- #: ../../library/filecmp.rst:132
197+ #: ../../library/filecmp.rst:135
191198msgid "Files and subdirectories only in *a*."
192199msgstr "仅在目录 *a* 中的文件和子目录。"
193200
194- #: ../../library/filecmp.rst:137
201+ #: ../../library/filecmp.rst:140
195202msgid "Files and subdirectories only in *b*."
196203msgstr "仅在目录 *b* 中的文件和子目录。"
197204
198- #: ../../library/filecmp.rst:142
205+ #: ../../library/filecmp.rst:145
199206msgid "Subdirectories in both *a* and *b*."
200207msgstr "同时存在于目录 *a* 和 *b* 中的子目录。"
201208
202- #: ../../library/filecmp.rst:147
209+ #: ../../library/filecmp.rst:150
203210msgid "Files in both *a* and *b*."
204211msgstr "同时存在于目录 *a* 和 *b* 中的文件。"
205212
206- #: ../../library/filecmp.rst:152
213+ #: ../../library/filecmp.rst:155
207214msgid ""
208215"Names in both *a* and *b*, such that the type differs between the "
209216"directories, or names for which :func:`os.stat` reports an error."
210217msgstr "在目录 *a* 和 *b* 中类型不同的名字,或者那些 :func:`os.stat` 报告错误的名字。"
211218
212- #: ../../library/filecmp.rst:158
219+ #: ../../library/filecmp.rst:161
213220msgid ""
214221"Files which are identical in both *a* and *b*, using the class's file "
215222"comparison operator."
216223msgstr "在目录 *a* 和 *b* 中,使用类的文件比较操作符判定相等的文件。"
217224
218- #: ../../library/filecmp.rst:164
225+ #: ../../library/filecmp.rst:167
219226msgid ""
220227"Files which are in both *a* and *b*, whose contents differ according to the "
221228"class's file comparison operator."
222229msgstr "在目录 *a* 和 *b* 中,根据类的文件比较操作符判定内容不等的文件。"
223230
224- #: ../../library/filecmp.rst:170
231+ #: ../../library/filecmp.rst:173
225232msgid "Files which are in both *a* and *b*, but could not be compared."
226233msgstr "在目录 *a* 和 *b* 中无法比较的文件。"
227234
228- #: ../../library/filecmp.rst:175
235+ #: ../../library/filecmp.rst:178
229236msgid ""
230237"A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` "
231238"instances (or MyDirCmp instances if this instance is of type MyDirCmp, a "
@@ -234,19 +241,19 @@ msgstr ""
234241"一个将 :attr:`common_dirs` 中的名称映射到 :class:`dircmp` 实例(或者 MyDirCmp 实例,如果该实例类型为 "
235242":class:`dircmp` 的子类 MyDirCmp 的话)的字典。"
236243
237- #: ../../library/filecmp.rst:179
244+ #: ../../library/filecmp.rst:182
238245msgid ""
239246"Previously entries were always :class:`dircmp` instances. Now entries are "
240247"the same type as *self*, if *self* is a subclass of :class:`dircmp`."
241248msgstr ""
242249"在之前版本中字典条目总是为 :class:`dircmp` 实例。 现在条目将与 *self* 的类型相同,如果 *self* 为 "
243250":class:`dircmp` 的子类的话。"
244251
245- #: ../../library/filecmp.rst:188
252+ #: ../../library/filecmp.rst:191
246253msgid "List of directories ignored by :class:`dircmp` by default."
247254msgstr "默认被 :class:`dircmp` 忽略的目录列表。"
248255
249- #: ../../library/filecmp.rst:191
256+ #: ../../library/filecmp.rst:194
250257msgid ""
251258"Here is a simplified example of using the ``subdirs`` attribute to search "
252259"recursively through two directories to show common different files::"
0 commit comments