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