@@ -12,7 +12,7 @@ msgid ""
12
12
msgstr ""
13
13
"Project-Id-Version : Python 3.10\n "
14
14
"Report-Msgid-Bugs-To : \n "
15
- "POT-Creation-Date : 2024-04-05 19:04 +0000\n "
15
+ "POT-Creation-Date : 2024-04-12 18:59 +0000\n "
16
16
"PO-Revision-Date : 2022-11-05 17:23+0000\n "
17
17
"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
18
18
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -1273,6 +1273,10 @@ msgid ""
1273
1273
":mod:`~email.generator` in order to pass formatting parameters to its "
1274
1274
"``flatten`` method. (Contributed by R. David Murray in :issue:`18600`.)"
1275
1275
msgstr ""
1276
+ "现在 :meth:`~email.message.Message.as_string` 接受一个 *policy* "
1277
+ "参数用于在生成其字符串表示形式时重写默认的消息策略。 这意味着 ``as_string`` 现在可以在更多情况下被使用,而不必创建和使用 "
1278
+ ":mod:`~email.generator` 来将已格式化的形参传递给其 ``flatten`` 方法。 (由 R. David Murray 在 "
1279
+ ":issue:`18600` 中贡献。)"
1276
1280
1277
1281
#: ../../whatsnew/3.4.rst:802
1278
1282
msgid ""
@@ -1285,6 +1289,11 @@ msgid ""
1285
1289
"intuitive result: a bytes object containing the fully formatted message. "
1286
1290
"(Contributed by R. David Murray in :issue:`18600`.)"
1287
1291
msgstr ""
1292
+ "新增方法 :meth:`~email.message.Message.as_bytes` 用于产生消息的与 ``as_string`` "
1293
+ "所产生的字符串表示形式类似的字节串表示形式。 它不接受 *maxheaderlen* 参数,但接受 *unixfrom* 和 *policy* 参数。 "
1294
+ ":class:`~email.message.Message` 的 :meth:`~email.message.Message.__bytes__` "
1295
+ "方法将调用它,这意味着现在 ``bytes(mymsg)`` 将产生直观的结果:一个包含完整已格式化消息的字节串对象。 (由 R. David "
1296
+ "Murray 在 :issue:`18600` 中贡献。)"
1288
1297
1289
1298
#: ../../whatsnew/3.4.rst:811
1290
1299
msgid ""
@@ -1294,6 +1303,9 @@ msgid ""
1294
1303
"the default is ``False``. (Contributed by R. David Murray in "
1295
1304
":issue:`18891`.)"
1296
1305
msgstr ""
1306
+ "现在 :meth:`.Message.set_param` 消息接受一个 *replace* 关键字参数。 "
1307
+ "当指定该参数时,关联的标头将被更新而不会修改其在标头列表中的位置。 为了保持向下兼容,该参数默认值为 ``False``。 (由 R. David "
1308
+ "Murray 在 :issue:`18891` 中贡献。)"
1297
1309
1298
1310
#: ../../whatsnew/3.4.rst:819
1299
1311
msgid ""
@@ -1311,6 +1323,14 @@ msgid ""
1311
1323
" final in Python 3.5 (possibly with a few minor additions in the area of "
1312
1324
"error handling). (Contributed by R. David Murray in :issue:`18891`.)"
1313
1325
msgstr ""
1326
+ "新增了一对 :class:`~email.message.Message` 的子类 (:class:`.EmailMessage` 和 "
1327
+ ":class:`.MIMEPart`),以及新的子模块 :mod:`~email.contentmanager` 和新的 "
1328
+ ":mod:`~email.policy` 属性 :attr:`~email.policy.EmailPolicy.content_manager`。 "
1329
+ "所有文档目前都在新模块中,它是作为 email 的新 :term:`provisional API` 的一部分添加的。 "
1330
+ "这些类提供了多个使从内容提取邮件消息和插入内容到消息更容易的新方法。 相关细节,请参阅 :mod:`~email.contentmanager` 文档和"
1331
+ " :ref:`email-examples`。 这些 API 的加入完成了作为 email6 项目计划组成部分的大部分工作。 目前的暂定 API 计划在"
1332
+ " Python 3.5 最终确定 (可能在错误处理方面再增加少量内容)。 (由 R. David Murray 在 :issue:`18891` "
1333
+ "中贡献。)"
1314
1334
1315
1335
#: ../../whatsnew/3.4.rst:835
1316
1336
msgid "filecmp"
@@ -1325,6 +1345,10 @@ msgid ""
1325
1345
"less time than the resolution of a particular filesystem's file modification"
1326
1346
" time field. (Contributed by Mark Levitt in :issue:`18149`.)"
1327
1347
msgstr ""
1348
+ "新增的 :func:`~filecmp.clear_cache` 函数提供了清除 :mod:`filecmp` 比较缓存的功能,它使用 "
1349
+ ":func:`os.stat` 信息来确定文件自上次比较后是否发生了更改。 "
1350
+ "例如,如果文件被修改和重新检查的时间短于特定文件系统文件修改时间的精度就可使用这一功能。 (由 Mark Levitt 在 :issue:`18149`"
1351
+ " 中贡献。)"
1328
1352
1329
1353
#: ../../whatsnew/3.4.rst:844
1330
1354
msgid ""
@@ -1347,6 +1371,10 @@ msgid ""
1347
1371
"normal instance methods when included in a class definition. (Contributed by"
1348
1372
" Alon Horev and Nick Coghlan in :issue:`4331`.)"
1349
1373
msgstr ""
1374
+ "新增的 :func:`~functools.partialmethod` 描述器提供了对描述器的部分参数应用,就像 "
1375
+ ":func:`~functools.partial` 为普通可调用对象提供的一样。 新的描述器还可以让任意可调用对象 (包括 "
1376
+ ":func:`~functools.partial` 实例)在包括在类定义中时表现得像普通的实例方法一样。 (由 Alon Horev 和 Nick "
1377
+ "Coghlan 在 :issue:`4331` 中贡献。)"
1350
1378
1351
1379
#: ../../whatsnew/3.4.rst:862
1352
1380
msgid ""
@@ -1357,6 +1385,8 @@ msgid ""
1357
1385
"multiple implementations of an operation that allows it to work with "
1358
1386
"*different* kinds of data."
1359
1387
msgstr ""
1388
+ "新增的 :func:`~functools.singledispatch` 装饰器为 Python 标准库带来了对单分派泛型函数的支持。 "
1389
+ "面向对象编程侧重于将对一组共同数据的多种操作组合到一个类中,而泛型函数则侧重于将一种操作的多个实现组合在一起使其能够处理 *不同* 种类的数据。"
1360
1390
1361
1391
#: ../../whatsnew/3.4.rst:871
1362
1392
msgid ":pep:`443` -- Single-dispatch generic functions"
@@ -1420,6 +1450,9 @@ msgid ""
1420
1450
"based key derivation function 2 <https://en.wikipedia.org/wiki/PBKDF2>`_. "
1421
1451
"(Contributed by Christian Heimes in :issue:`18582`.)"
1422
1452
msgstr ""
1453
+ "新增的 :func:`hashlib.pbkdf2_hmac` 函数提供了 `PKCS#5 基于口令的密钥派生函数 2 "
1454
+ "<https://en.wikipedia.org/wiki/PBKDF2>`_。 (由 Christian Heimes 在 "
1455
+ ":issue:`18582` 中贡献。)"
1423
1456
1424
1457
#: ../../whatsnew/3.4.rst:908
1425
1458
msgid ""
@@ -1430,6 +1463,9 @@ msgid ""
1430
1463
"Python implementations have not previously supported it. (Contributed by "
1431
1464
"Jason R. Coombs in :issue:`18532`.)"
1432
1465
msgstr ""
1466
+ "现在 :mod:`hashlib` 哈希对象的 :attr:`~hashlib.hash.name` 属性已成为受正式支持的接口。 它一直存在于 "
1467
+ "CPython 的 :mod:`hashlib` 中(尽管它没有返回所有受支持的哈希算法的小写名称),但它不是一个公开的接口因此其他一些 Python "
1468
+ "实现以前并不支持它。 (由 Jason R. Coombs 在 :issue:`18532` 中提供。)"
1433
1469
1434
1470
#: ../../whatsnew/3.4.rst:917
1435
1471
msgid "hmac"
@@ -1443,6 +1479,9 @@ msgid ""
1443
1479
"accepts any type supported by the :mod:`hashlib` module. (Contributed by "
1444
1480
"Jonas Borgström in :issue:`18240`.)"
1445
1481
msgstr ""
1482
+ "现在 :mod:`hmac` 可接受 ``bytearray`` 和 ``bytes`` 作为传给 :func:`~hmac.new` 函数的 "
1483
+ "*key* 参数,而传给 :func:`~hmac.new` 函数和 :meth:`~hmac.HMAC.update` 方法的 *msg* "
1484
+ "形参现在可接受 :mod:`hashlib` 模块所支持的任何类型。 (由 Jonas Borgström 的 :issue:`18240` 中贡献。)"
1446
1485
1447
1486
#: ../../whatsnew/3.4.rst:925
1448
1487
msgid ""
@@ -1452,6 +1491,9 @@ msgid ""
1452
1491
"deprecated: in a future version of Python there will be no default value. "
1453
1492
"(Contributed by Christian Heimes in :issue:`17276`.)"
1454
1493
msgstr ""
1494
+ "传给 :func:`hmac.new` 函数的 *digestmod* 参数现在可以是 :mod:`hashlib` 能识别的任何哈希摘要名称。 "
1495
+ "此外,当前将 *digestmod* 默认值设为 ``MD5`` 的行为已被弃用:在未来的 Python 版本中将没有默认值。 (由 Christian"
1496
+ " Heimes 在 :issue:`17276` 中贡献。)"
1455
1497
1456
1498
#: ../../whatsnew/3.4.rst:931
1457
1499
msgid ""
@@ -1461,6 +1503,9 @@ msgid ""
1461
1503
"conforms fully to the :pep:`247` API. (Contributed by Christian Heimes in "
1462
1504
":issue:`18775`.)"
1463
1505
msgstr ""
1506
+ "由于增加了 :attr:`~hmac.HMAC.block_size` 和 :attr:`~hmac.HMAC.name` 属性 (以及 "
1507
+ ":attr:`~hmac.HMAC.digest_size` 属性的正式文档),:mod:`hmac` 模块现在已完全符合 :pep:`247` "
1508
+ "API。 (由 Christian Heimes 在 :issue:`18775` 中贡献。)"
1464
1509
1465
1510
#: ../../whatsnew/3.4.rst:938
1466
1511
msgid "html"
@@ -1484,12 +1529,17 @@ msgid ""
1484
1529
"invited to set it explicitly and update your code to use this new feature. "
1485
1530
"(Contributed by Ezio Melotti in :issue:`13633`.)"
1486
1531
msgstr ""
1532
+ ":class:`~html.parser.HTMLParser` 接受新的关键字参数 *convert_charrefs*,当其为 ``True`` "
1533
+ "时,会自动转换所有字符引用。 为了保持向下兼容,其值默认为 ``False``,但在未来的 Python 版本中将改为 "
1534
+ "``True``,因此建议你显式地设置它并更新代码以使用这个新特性。 (由 Ezio Melotti 在 :issue:`13633` 中贡献。)"
1487
1535
1488
1536
#: ../../whatsnew/3.4.rst:951
1489
1537
msgid ""
1490
1538
"The *strict* argument of :class:`~html.parser.HTMLParser` is now deprecated."
1491
1539
" (Contributed by Ezio Melotti in :issue:`15114`.)"
1492
1540
msgstr ""
1541
+ "现在 :class:`~html.parser.HTMLParser` 的 *strict* 参数已被弃用。 (由 Ezio Melotti 在 "
1542
+ ":issue:`15114` 中贡献。)"
1493
1543
1494
1544
#: ../../whatsnew/3.4.rst:956
1495
1545
msgid "http"
@@ -1683,6 +1733,8 @@ msgid ""
1683
1733
"parameter that can be used to specify the time of day when rollover should "
1684
1734
"happen. (Contributed by Ronald Oussoren in :issue:`9556`.)"
1685
1735
msgstr ""
1736
+ ":class:`~logging.handlers.TimedRotatingFileHandler` 新增的 *atTime* "
1737
+ "形参可被用于指定每日要执行日志文件轮转的时间。 (由 Ronald Oussoren 在 :issue:`9556` 中贡献。)"
1686
1738
1687
1739
#: ../../whatsnew/3.4.rst:1079
1688
1740
msgid ""
@@ -1691,6 +1743,9 @@ msgid ""
1691
1743
"(by setting *port* to ``None``). (Contributed by Vinay Sajip in commit "
1692
1744
"ce46195b56a9.)"
1693
1745
msgstr ""
1746
+ "现在 :class:`~logging.handlers.SocketHandler` 和 "
1747
+ ":class:`~logging.handlers.DatagramHandler` 已支持 Unix 域套接字 (通过将 *port* 设为 "
1748
+ "``None``)。 (由 Vinay Sajip 在 commit ce46195b56a9 中贡献。)"
1694
1749
1695
1750
#: ../../whatsnew/3.4.rst:1084
1696
1751
msgid ""
@@ -2254,6 +2309,11 @@ msgid ""
2254
2309
"(``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`). (Contributed by Christian "
2255
2310
"Heimes in :issue:`19292`.)"
2256
2311
msgstr ""
2312
+ "新增的 :class:`~ssl.SSLContext` 方法 :meth:`~ssl.SSLContext.load_default_certs` "
2313
+ "可从默认位置加载一组默认的“证书颁发机构”(CA)证书,此位置随平台而异。 它可被用于加载 TLS Web 服务器验证证书 "
2314
+ "(``purpose=``:data:`~ssl.Purpose.SERVER_AUTH` ) "
2315
+ "供客户端用来验证服务器,或加载证书供服务器用来验证客户端证书 (``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`"
2316
+ " )。 (由 Christian Heimes 在 :issue:`19292` 中贡献。)"
2257
2317
2258
2318
#: ../../whatsnew/3.4.rst:1479
2259
2319
msgid ""
@@ -2318,6 +2378,9 @@ msgid ""
2318
2378
"streamed unpacking of a buffer containing repeated instances of a given "
2319
2379
"format of data. (Contributed by Antoine Pitrou in :issue:`17804`.)"
2320
2380
msgstr ""
2381
+ "新增函数 :mod:`~struct.iter_unpack` 和在已编译格式上的新增方法 "
2382
+ ":meth:`struct.Struct.iter_unpack` 提供了对包含给定格式数据的重复实例的缓冲区的流式解包功能。 (由 Antoine "
2383
+ "Pitrou 在 :issue:`17804` 中贡献。)"
2321
2384
2322
2385
#: ../../whatsnew/3.4.rst:1517
2323
2386
msgid "subprocess"
@@ -2329,13 +2392,17 @@ msgid ""
2329
2392
" used to provide the contents of ``stdin`` for the command that is run. "
2330
2393
"(Contributed by Zack Weinberg in :issue:`16624`.)"
2331
2394
msgstr ""
2395
+ "现在 :func:`~subprocess.check_output` 接受一个 *input* 参数用于为所运行的命令提供 ``stdin`` "
2396
+ "的内容。 (由 Zack Weinberg 在 :issue:`16624` 中贡献。)"
2332
2397
2333
2398
#: ../../whatsnew/3.4.rst:1523
2334
2399
msgid ""
2335
2400
":func:`~subprocess.getstatus` and :func:`~subprocess.getstatusoutput` now "
2336
2401
"work on Windows. This change was actually inadvertently made in 3.3.4. "
2337
2402
"(Contributed by Tim Golden in :issue:`10197`.)"
2338
2403
msgstr ""
2404
+ "现在 :func:`~subprocess.getstatus` 和 :func:`~subprocess.getstatusoutput` 已适用于 "
2405
+ "Windows。 这一修改是在 3.3.4 中意外实施的。 (由 Tim Golden 在 :issue:`10197` 中贡献。)"
2339
2406
2340
2407
#: ../../whatsnew/3.4.rst:1529
2341
2408
msgid "sunau"
@@ -2346,6 +2413,8 @@ msgid ""
2346
2413
"The :meth:`~sunau.getparams` method now returns a namedtuple rather than a "
2347
2414
"plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.)"
2348
2415
msgstr ""
2416
+ "现在 :meth:`~sunau.getparams` 方法将返回一个具名元组而不是普通元组。 (由 Claudiu Popa 在 "
2417
+ ":issue:`18901` 中贡献。)"
2349
2418
2350
2419
#: ../../whatsnew/3.4.rst:1534
2351
2420
msgid ""
@@ -2354,20 +2423,27 @@ msgid ""
2354
2423
" be called automatically at the end of the block. (Contributed by Serhiy "
2355
2424
"Storchaka in :issue:`18878`.)"
2356
2425
msgstr ""
2426
+ "现在 :meth:`sunau.open` 已支持上下文管理协议:当在 :keyword:`with` 代码块中使用时,所返回对象的 ``close``"
2427
+ " 方法将在代码块结束时被自动调用。 (由 Serhiy Storchaka 在 :issue:`18878` 中贡献。)"
2357
2428
2358
2429
#: ../../whatsnew/3.4.rst:1539
2359
2430
msgid ""
2360
2431
":meth:`.AU_write.setsampwidth` now supports 24 bit samples, thus adding "
2361
2432
"support for writing 24 sample using the module. (Contributed by Serhiy "
2362
2433
"Storchaka in :issue:`19261`.)"
2363
2434
msgstr ""
2435
+ "现在 :meth:`.AU_write.setsampwidth` 已支持 24 位采样,因此增加了使用该模块写入 24 位采样的支持。 (由 "
2436
+ "Serhiy Storchaka 在 :issue:`19261` 中贡献。)"
2364
2437
2365
2438
#: ../../whatsnew/3.4.rst:1543
2366
2439
msgid ""
2367
2440
"The :meth:`~sunau.AU_write.writeframesraw` and "
2368
2441
":meth:`~sunau.AU_write.writeframes` methods now accept any :term:`bytes-like"
2369
2442
" object`. (Contributed by Serhiy Storchaka in :issue:`8311`.)"
2370
2443
msgstr ""
2444
+ "现在 :meth:`~sunau.AU_write.writeframesraw` 和 "
2445
+ ":meth:`~sunau.AU_write.writeframes` 方法将接受任意 :term:`bytes-like object`。 (由 "
2446
+ "Serhiy Storchaka 在 :issue:`8311` 中贡献。)"
2371
2447
2372
2448
#: ../../whatsnew/3.4.rst:1549
2373
2449
msgid "sys"
@@ -2382,6 +2458,9 @@ msgid ""
2382
2458
"leaks, especially if automated via a test suite. (Contributed by Antoine "
2383
2459
"Pitrou in :issue:`13390`.)"
2384
2460
msgstr ""
2461
+ "新增函数 :func:`sys.getallocatedblocks` 可返回当前由解释器所分配的内存块数量。 (在使用默认 ``--with-"
2462
+ "pymalloc`` 设置的 CPython 中,这将是通过 :c:func:`PyObject_Malloc` API 执行的分配。) "
2463
+ "这在追踪内存泄漏时会很有用处,特别是对于通过测试套件自动追踪的场景。 (由 Antoine Pitrou 在 :issue:`13390` 中贡献。)"
2385
2464
2386
2465
#: ../../whatsnew/3.4.rst:1558
2387
2466
msgid ""
@@ -2971,6 +3050,8 @@ msgid ""
2971
3050
"now works correctly (previously it silently returned the first python module"
2972
3051
" in the file). (Contributed by Václav Šmilauer in :issue:`16421`.)"
2973
3052
msgstr ""
3053
+ "现在将能够正确地从单个 OS 模块加载多个 (``.so``, ``.dll``) python 模块(在之前版本中则会静默地返回文件中的第一个 "
3054
+ "python 模块)。 (由 Václav Šmilauer 在 :issue:`16421` 中贡献。)"
2974
3055
2975
3056
#: ../../whatsnew/3.4.rst:1983
2976
3057
msgid ""
@@ -2979,20 +3060,27 @@ msgid ""
2979
3060
" uses of :ref:`__prepare__ <prepare>`. (Contributed by Benjamin Peterson in"
2980
3061
" :issue:`17853`.)"
2981
3062
msgstr ""
3063
+ "增加了新的操作码 :opcode:`LOAD_CLASSDEREF`,用于修复一个在类体中加载自由变量的程序错误,它可能因 "
3064
+ ":ref:`__prepare__ <prepare>` 的特定用法而触发。 (由 Benjamin Peterson 在 :issue:`17853`"
3065
+ " 中贡献。)"
2982
3066
2983
3067
#: ../../whatsnew/3.4.rst:1988
2984
3068
msgid ""
2985
3069
"A number of MemoryError-related crashes were identified and fixed by Victor "
2986
3070
"Stinner using his :pep:`445`-based ``pyfailmalloc`` tool (:issue:`18408`, "
2987
3071
":issue:`18520`)."
2988
3072
msgstr ""
3073
+ "多个有关 MemoryError 的崩溃问题被 Victor Stinner 使用他基于 :pep:`445` 的 ``pyfailmalloc`` "
3074
+ "工具加以确定并修复 (:issue:`18408`, :issue:`18520`)。"
2989
3075
2990
3076
#: ../../whatsnew/3.4.rst:1992
2991
3077
msgid ""
2992
3078
"The ``pyvenv`` command now accepts a ``--copies`` option to use copies "
2993
3079
"rather than symlinks even on systems where symlinks are the default. "
2994
3080
"(Contributed by Vinay Sajip in :issue:`18807`.)"
2995
3081
msgstr ""
3082
+ "现在 ``pyvenv`` 命令接受一个 ``--copies`` 选项以使用拷贝而不是符号链接,即使在默认使用符号链接的系统上也是如此。 (由 "
3083
+ "Vinay Sajip 在 :issue:`18807` 中贡献。)"
2996
3084
2997
3085
#: ../../whatsnew/3.4.rst:1996
2998
3086
msgid ""
0 commit comments