@@ -2227,6 +2227,8 @@ msgid ""
2227
2227
"common sub-path of each passed pathname. Unlike the "
2228
2228
":func:`os.path.commonprefix` function, it always returns a valid path::"
2229
2229
msgstr ""
2230
+ "新增的 :func:`os.path.commonpath` 函数可返回所传入的每个路径名的最长共同子路径。 与 "
2231
+ ":func:`os.path.commonprefix` 函数不同,该函数总是会返回一个有效的路径::"
2230
2232
2231
2233
#: ../../whatsnew/3.5.rst:1518
2232
2234
msgid "(Contributed by Rafik Draoui and Serhiy Storchaka in :issue:`10395`.)"
@@ -2242,6 +2244,8 @@ msgid ""
2242
2244
"to check whether the path points to the same file as another path, which can"
2243
2245
" be either another :class:`~pathlib.Path` object, or a string::"
2244
2246
msgstr ""
2247
+ "新增的 :meth:`Path.samefile() <pathlib.Path.samefile>` "
2248
+ "方法可被用来检查一个路径是否与另一个路径指向相同的文件,两个路径可以是 :class:`~pathlib.Path` 对象,也可以是字符串::"
2245
2249
2246
2250
#: ../../whatsnew/3.5.rst:1534
2247
2251
msgid "(Contributed by Vajrasky Kok and Antoine Pitrou in :issue:`19775`.)"
@@ -2253,13 +2257,18 @@ msgid ""
2253
2257
"optional *exist_ok* argument to match ``mkdir -p`` and :func:`os.makedirs` "
2254
2258
"functionality. (Contributed by Berker Peksag in :issue:`21539`.)"
2255
2259
msgstr ""
2260
+ "现在 :meth:`Path.mkdir() <pathlib.Path.mkdir>` 方法接受一个新的 *exist_ok* 可选参数以与 "
2261
+ "``mkdir -p`` 和 :func:`os.makedirs` 的功能相匹配。 (由 Berker Peksag 在 :issue:`21539`"
2262
+ " 中贡献。)"
2256
2263
2257
2264
#: ../../whatsnew/3.5.rst:1540
2258
2265
msgid ""
2259
2266
"There is a new :meth:`Path.expanduser() <pathlib.Path.expanduser>` method to"
2260
2267
" expand ``~`` and ``~user`` prefixes. (Contributed by Serhiy Storchaka and "
2261
2268
"Claudiu Popa in :issue:`19776`.)"
2262
2269
msgstr ""
2270
+ "新增了一个 :meth:`Path.expanduser() <pathlib.Path.expanduser>` 方法用于扩展 ``~`` 和 "
2271
+ "``~user`` 前缀。 (由 Serhiy Storchaka 和 Claudiu Popa 在 :issue:`19776` 中贡献。)"
2263
2272
2264
2273
#: ../../whatsnew/3.5.rst:1544
2265
2274
msgid ""
@@ -2268,6 +2277,9 @@ msgid ""
2268
2277
"directory. (Contributed by Victor Salgado and Mayank Tripathi in "
2269
2278
":issue:`19777`.)"
2270
2279
msgstr ""
2280
+ "新增的 :meth:`Path.home() <pathlib.Path.home>` 类方法可被用于获取代表用户家目录的 "
2281
+ ":class:`~pathlib.Path` 实例。 (由 Victor Salgado 和 Mayank Tripathi 在 "
2282
+ ":issue:`19777` 中贡献。)"
2271
2283
2272
2284
#: ../../whatsnew/3.5.rst:1549
2273
2285
msgid ""
@@ -2277,6 +2289,10 @@ msgid ""
2277
2289
"<pathlib.Path.read_bytes>` methods to simplify read/write operations on "
2278
2290
"files."
2279
2291
msgstr ""
2292
+ "新增 :meth:`Path.write_text() <pathlib.Path.write_text>`, "
2293
+ ":meth:`Path.read_text() <pathlib.Path.read_text>`, :meth:`Path.write_bytes()"
2294
+ " <pathlib.Path.write_bytes>`, :meth:`Path.read_bytes() "
2295
+ "<pathlib.Path.read_bytes>` 方法用于简化对文件的读/写操作。"
2280
2296
2281
2297
#: ../../whatsnew/3.5.rst:1555
2282
2298
msgid ""
@@ -2299,6 +2315,8 @@ msgid ""
2299
2315
" version 4. Protocol version 4 already supports these cases. (Contributed "
2300
2316
"by Serhiy Storchaka in :issue:`23611`.)"
2301
2317
msgstr ""
2318
+ "嵌套的对象,例如未绑定方法或嵌套的类,现在可以使用早于协议版本 4 的 :ref:`pickle 协议 <pickle-protocols>`。 "
2319
+ "协议版本 4 在此前已支持此种场景。 (由 Serhiy Storchaka 在 :issue:`23611` 中贡献。)"
2302
2320
2303
2321
#: ../../whatsnew/3.5.rst:1576
2304
2322
msgid "poplib"
@@ -2310,6 +2328,8 @@ msgid ""
2310
2328
"(Internationalized Email) support, if a POP server supports it. (Contributed"
2311
2329
" by Milan OberKirch in :issue:`21804`.)"
2312
2330
msgstr ""
2331
+ "新增 :meth:`POP3.utf8() <poplib.POP3.utf8>` 命令可以启用 :rfc:`6856` (国际化 Email) "
2332
+ "支持,如果 POP 服务器支持的话。 (由 Milan OberKirch 在 :issue:`21804` 中贡献。)"
2313
2333
2314
2334
#: ../../whatsnew/3.5.rst:1584
2315
2335
msgid "re"
@@ -2319,7 +2339,7 @@ msgstr "re"
2319
2339
msgid ""
2320
2340
"References and conditional references to groups with fixed length are now "
2321
2341
"allowed in lookbehind assertions::"
2322
- msgstr ""
2342
+ msgstr "现在对固定长度分组的引用和有条件引用在后视断言中已被允许:: "
2323
2343
2324
2344
#: ../../whatsnew/3.5.rst:1596
2325
2345
msgid "(Contributed by Serhiy Storchaka in :issue:`9179`.)"
@@ -2330,6 +2350,7 @@ msgid ""
2330
2350
"The number of capturing groups in regular expressions is no longer limited "
2331
2351
"to 100. (Contributed by Serhiy Storchaka in :issue:`22437`.)"
2332
2352
msgstr ""
2353
+ "在正则表达式中捕获分组的数量不再有 100 个的上限。 (由 Serhiy Storchaka 在 :issue:`22437` 中贡献。)"
2333
2354
2334
2355
#: ../../whatsnew/3.5.rst:1601
2335
2356
msgid ""
0 commit comments