@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version : Python 3.10\n "
1414"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 "
1616"PO-Revision-Date : 2022-11-05 17:23+0000\n "
1717"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
1818"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -1273,6 +1273,10 @@ msgid ""
12731273":mod:`~email.generator` in order to pass formatting parameters to its "
12741274"``flatten`` method. (Contributed by R. David Murray in :issue:`18600`.)"
12751275msgstr ""
1276+ "现在 :meth:`~email.message.Message.as_string` 接受一个 *policy* "
1277+ "参数用于在生成其字符串表示形式时重写默认的消息策略。 这意味着 ``as_string`` 现在可以在更多情况下被使用,而不必创建和使用 "
1278+ ":mod:`~email.generator` 来将已格式化的形参传递给其 ``flatten`` 方法。 (由 R. David Murray 在 "
1279+ ":issue:`18600` 中贡献。)"
12761280
12771281#: ../../whatsnew/3.4.rst:802
12781282msgid ""
@@ -1285,6 +1289,11 @@ msgid ""
12851289"intuitive result: a bytes object containing the fully formatted message. "
12861290"(Contributed by R. David Murray in :issue:`18600`.)"
12871291msgstr ""
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` 中贡献。)"
12881297
12891298#: ../../whatsnew/3.4.rst:811
12901299msgid ""
@@ -1294,6 +1303,9 @@ msgid ""
12941303"the default is ``False``. (Contributed by R. David Murray in "
12951304":issue:`18891`.)"
12961305msgstr ""
1306+ "现在 :meth:`.Message.set_param` 消息接受一个 *replace* 关键字参数。 "
1307+ "当指定该参数时,关联的标头将被更新而不会修改其在标头列表中的位置。 为了保持向下兼容,该参数默认值为 ``False``。 (由 R. David "
1308+ "Murray 在 :issue:`18891` 中贡献。)"
12971309
12981310#: ../../whatsnew/3.4.rst:819
12991311msgid ""
@@ -1311,6 +1323,14 @@ msgid ""
13111323" final in Python 3.5 (possibly with a few minor additions in the area of "
13121324"error handling). (Contributed by R. David Murray in :issue:`18891`.)"
13131325msgstr ""
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+ "中贡献。)"
13141334
13151335#: ../../whatsnew/3.4.rst:835
13161336msgid "filecmp"
@@ -1325,6 +1345,10 @@ msgid ""
13251345"less time than the resolution of a particular filesystem's file modification"
13261346" time field. (Contributed by Mark Levitt in :issue:`18149`.)"
13271347msgstr ""
1348+ "新增的 :func:`~filecmp.clear_cache` 函数提供了清除 :mod:`filecmp` 比较缓存的功能,它使用 "
1349+ ":func:`os.stat` 信息来确定文件自上次比较后是否发生了更改。 "
1350+ "例如,如果文件被修改和重新检查的时间短于特定文件系统文件修改时间的精度就可使用这一功能。 (由 Mark Levitt 在 :issue:`18149`"
1351+ " 中贡献。)"
13281352
13291353#: ../../whatsnew/3.4.rst:844
13301354msgid ""
@@ -1347,6 +1371,10 @@ msgid ""
13471371"normal instance methods when included in a class definition. (Contributed by"
13481372" Alon Horev and Nick Coghlan in :issue:`4331`.)"
13491373msgstr ""
1374+ "新增的 :func:`~functools.partialmethod` 描述器提供了对描述器的部分参数应用,就像 "
1375+ ":func:`~functools.partial` 为普通可调用对象提供的一样。 新的描述器还可以让任意可调用对象 (包括 "
1376+ ":func:`~functools.partial` 实例)在包括在类定义中时表现得像普通的实例方法一样。 (由 Alon Horev 和 Nick "
1377+ "Coghlan 在 :issue:`4331` 中贡献。)"
13501378
13511379#: ../../whatsnew/3.4.rst:862
13521380msgid ""
@@ -1357,6 +1385,8 @@ msgid ""
13571385"multiple implementations of an operation that allows it to work with "
13581386"*different* kinds of data."
13591387msgstr ""
1388+ "新增的 :func:`~functools.singledispatch` 装饰器为 Python 标准库带来了对单分派泛型函数的支持。 "
1389+ "面向对象编程侧重于将对一组共同数据的多种操作组合到一个类中,而泛型函数则侧重于将一种操作的多个实现组合在一起使其能够处理 *不同* 种类的数据。"
13601390
13611391#: ../../whatsnew/3.4.rst:871
13621392msgid ":pep:`443` -- Single-dispatch generic functions"
@@ -1420,6 +1450,9 @@ msgid ""
14201450"based key derivation function 2 <https://en.wikipedia.org/wiki/PBKDF2>`_. "
14211451"(Contributed by Christian Heimes in :issue:`18582`.)"
14221452msgstr ""
1453+ "新增的 :func:`hashlib.pbkdf2_hmac` 函数提供了 `PKCS#5 基于口令的密钥派生函数 2 "
1454+ "<https://en.wikipedia.org/wiki/PBKDF2>`_。 (由 Christian Heimes 在 "
1455+ ":issue:`18582` 中贡献。)"
14231456
14241457#: ../../whatsnew/3.4.rst:908
14251458msgid ""
@@ -1430,6 +1463,9 @@ msgid ""
14301463"Python implementations have not previously supported it. (Contributed by "
14311464"Jason R. Coombs in :issue:`18532`.)"
14321465msgstr ""
1466+ "现在 :mod:`hashlib` 哈希对象的 :attr:`~hashlib.hash.name` 属性已成为受正式支持的接口。 它一直存在于 "
1467+ "CPython 的 :mod:`hashlib` 中(尽管它没有返回所有受支持的哈希算法的小写名称),但它不是一个公开的接口因此其他一些 Python "
1468+ "实现以前并不支持它。 (由 Jason R. Coombs 在 :issue:`18532` 中提供。)"
14331469
14341470#: ../../whatsnew/3.4.rst:917
14351471msgid "hmac"
@@ -1443,6 +1479,9 @@ msgid ""
14431479"accepts any type supported by the :mod:`hashlib` module. (Contributed by "
14441480"Jonas Borgström in :issue:`18240`.)"
14451481msgstr ""
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` 中贡献。)"
14461485
14471486#: ../../whatsnew/3.4.rst:925
14481487msgid ""
@@ -1452,6 +1491,9 @@ msgid ""
14521491"deprecated: in a future version of Python there will be no default value. "
14531492"(Contributed by Christian Heimes in :issue:`17276`.)"
14541493msgstr ""
1494+ "传给 :func:`hmac.new` 函数的 *digestmod* 参数现在可以是 :mod:`hashlib` 能识别的任何哈希摘要名称。 "
1495+ "此外,当前将 *digestmod* 默认值设为 ``MD5`` 的行为已被弃用:在未来的 Python 版本中将没有默认值。 (由 Christian"
1496+ " Heimes 在 :issue:`17276` 中贡献。)"
14551497
14561498#: ../../whatsnew/3.4.rst:931
14571499msgid ""
@@ -1461,6 +1503,9 @@ msgid ""
14611503"conforms fully to the :pep:`247` API. (Contributed by Christian Heimes in "
14621504":issue:`18775`.)"
14631505msgstr ""
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` 中贡献。)"
14641509
14651510#: ../../whatsnew/3.4.rst:938
14661511msgid "html"
@@ -1484,12 +1529,17 @@ msgid ""
14841529"invited to set it explicitly and update your code to use this new feature. "
14851530"(Contributed by Ezio Melotti in :issue:`13633`.)"
14861531msgstr ""
1532+ ":class:`~html.parser.HTMLParser` 接受新的关键字参数 *convert_charrefs*,当其为 ``True`` "
1533+ "时,会自动转换所有字符引用。 为了保持向下兼容,其值默认为 ``False``,但在未来的 Python 版本中将改为 "
1534+ "``True``,因此建议你显式地设置它并更新代码以使用这个新特性。 (由 Ezio Melotti 在 :issue:`13633` 中贡献。)"
14871535
14881536#: ../../whatsnew/3.4.rst:951
14891537msgid ""
14901538"The *strict* argument of :class:`~html.parser.HTMLParser` is now deprecated."
14911539" (Contributed by Ezio Melotti in :issue:`15114`.)"
14921540msgstr ""
1541+ "现在 :class:`~html.parser.HTMLParser` 的 *strict* 参数已被弃用。 (由 Ezio Melotti 在 "
1542+ ":issue:`15114` 中贡献。)"
14931543
14941544#: ../../whatsnew/3.4.rst:956
14951545msgid "http"
@@ -1683,6 +1733,8 @@ msgid ""
16831733"parameter that can be used to specify the time of day when rollover should "
16841734"happen. (Contributed by Ronald Oussoren in :issue:`9556`.)"
16851735msgstr ""
1736+ ":class:`~logging.handlers.TimedRotatingFileHandler` 新增的 *atTime* "
1737+ "形参可被用于指定每日要执行日志文件轮转的时间。 (由 Ronald Oussoren 在 :issue:`9556` 中贡献。)"
16861738
16871739#: ../../whatsnew/3.4.rst:1079
16881740msgid ""
@@ -1691,6 +1743,9 @@ msgid ""
16911743"(by setting *port* to ``None``). (Contributed by Vinay Sajip in commit "
16921744"ce46195b56a9.)"
16931745msgstr ""
1746+ "现在 :class:`~logging.handlers.SocketHandler` 和 "
1747+ ":class:`~logging.handlers.DatagramHandler` 已支持 Unix 域套接字 (通过将 *port* 设为 "
1748+ "``None``)。 (由 Vinay Sajip 在 commit ce46195b56a9 中贡献。)"
16941749
16951750#: ../../whatsnew/3.4.rst:1084
16961751msgid ""
@@ -2254,6 +2309,11 @@ msgid ""
22542309"(``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`). (Contributed by Christian "
22552310"Heimes in :issue:`19292`.)"
22562311msgstr ""
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` 中贡献。)"
22572317
22582318#: ../../whatsnew/3.4.rst:1479
22592319msgid ""
@@ -2318,6 +2378,9 @@ msgid ""
23182378"streamed unpacking of a buffer containing repeated instances of a given "
23192379"format of data. (Contributed by Antoine Pitrou in :issue:`17804`.)"
23202380msgstr ""
2381+ "新增函数 :mod:`~struct.iter_unpack` 和在已编译格式上的新增方法 "
2382+ ":meth:`struct.Struct.iter_unpack` 提供了对包含给定格式数据的重复实例的缓冲区的流式解包功能。 (由 Antoine "
2383+ "Pitrou 在 :issue:`17804` 中贡献。)"
23212384
23222385#: ../../whatsnew/3.4.rst:1517
23232386msgid "subprocess"
@@ -2329,13 +2392,17 @@ msgid ""
23292392" used to provide the contents of ``stdin`` for the command that is run. "
23302393"(Contributed by Zack Weinberg in :issue:`16624`.)"
23312394msgstr ""
2395+ "现在 :func:`~subprocess.check_output` 接受一个 *input* 参数用于为所运行的命令提供 ``stdin`` "
2396+ "的内容。 (由 Zack Weinberg 在 :issue:`16624` 中贡献。)"
23322397
23332398#: ../../whatsnew/3.4.rst:1523
23342399msgid ""
23352400":func:`~subprocess.getstatus` and :func:`~subprocess.getstatusoutput` now "
23362401"work on Windows. This change was actually inadvertently made in 3.3.4. "
23372402"(Contributed by Tim Golden in :issue:`10197`.)"
23382403msgstr ""
2404+ "现在 :func:`~subprocess.getstatus` 和 :func:`~subprocess.getstatusoutput` 已适用于 "
2405+ "Windows。 这一修改是在 3.3.4 中意外实施的。 (由 Tim Golden 在 :issue:`10197` 中贡献。)"
23392406
23402407#: ../../whatsnew/3.4.rst:1529
23412408msgid "sunau"
@@ -2346,6 +2413,8 @@ msgid ""
23462413"The :meth:`~sunau.getparams` method now returns a namedtuple rather than a "
23472414"plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.)"
23482415msgstr ""
2416+ "现在 :meth:`~sunau.getparams` 方法将返回一个具名元组而不是普通元组。 (由 Claudiu Popa 在 "
2417+ ":issue:`18901` 中贡献。)"
23492418
23502419#: ../../whatsnew/3.4.rst:1534
23512420msgid ""
@@ -2354,20 +2423,27 @@ msgid ""
23542423" be called automatically at the end of the block. (Contributed by Serhiy "
23552424"Storchaka in :issue:`18878`.)"
23562425msgstr ""
2426+ "现在 :meth:`sunau.open` 已支持上下文管理协议:当在 :keyword:`with` 代码块中使用时,所返回对象的 ``close``"
2427+ " 方法将在代码块结束时被自动调用。 (由 Serhiy Storchaka 在 :issue:`18878` 中贡献。)"
23572428
23582429#: ../../whatsnew/3.4.rst:1539
23592430msgid ""
23602431":meth:`.AU_write.setsampwidth` now supports 24 bit samples, thus adding "
23612432"support for writing 24 sample using the module. (Contributed by Serhiy "
23622433"Storchaka in :issue:`19261`.)"
23632434msgstr ""
2435+ "现在 :meth:`.AU_write.setsampwidth` 已支持 24 位采样,因此增加了使用该模块写入 24 位采样的支持。 (由 "
2436+ "Serhiy Storchaka 在 :issue:`19261` 中贡献。)"
23642437
23652438#: ../../whatsnew/3.4.rst:1543
23662439msgid ""
23672440"The :meth:`~sunau.AU_write.writeframesraw` and "
23682441":meth:`~sunau.AU_write.writeframes` methods now accept any :term:`bytes-like"
23692442" object`. (Contributed by Serhiy Storchaka in :issue:`8311`.)"
23702443msgstr ""
2444+ "现在 :meth:`~sunau.AU_write.writeframesraw` 和 "
2445+ ":meth:`~sunau.AU_write.writeframes` 方法将接受任意 :term:`bytes-like object`。 (由 "
2446+ "Serhiy Storchaka 在 :issue:`8311` 中贡献。)"
23712447
23722448#: ../../whatsnew/3.4.rst:1549
23732449msgid "sys"
@@ -2382,6 +2458,9 @@ msgid ""
23822458"leaks, especially if automated via a test suite. (Contributed by Antoine "
23832459"Pitrou in :issue:`13390`.)"
23842460msgstr ""
2461+ "新增函数 :func:`sys.getallocatedblocks` 可返回当前由解释器所分配的内存块数量。 (在使用默认 ``--with-"
2462+ "pymalloc`` 设置的 CPython 中,这将是通过 :c:func:`PyObject_Malloc` API 执行的分配。) "
2463+ "这在追踪内存泄漏时会很有用处,特别是对于通过测试套件自动追踪的场景。 (由 Antoine Pitrou 在 :issue:`13390` 中贡献。)"
23852464
23862465#: ../../whatsnew/3.4.rst:1558
23872466msgid ""
@@ -2971,6 +3050,8 @@ msgid ""
29713050"now works correctly (previously it silently returned the first python module"
29723051" in the file). (Contributed by Václav Šmilauer in :issue:`16421`.)"
29733052msgstr ""
3053+ "现在将能够正确地从单个 OS 模块加载多个 (``.so``, ``.dll``) python 模块(在之前版本中则会静默地返回文件中的第一个 "
3054+ "python 模块)。 (由 Václav Šmilauer 在 :issue:`16421` 中贡献。)"
29743055
29753056#: ../../whatsnew/3.4.rst:1983
29763057msgid ""
@@ -2979,20 +3060,27 @@ msgid ""
29793060" uses of :ref:`__prepare__ <prepare>`. (Contributed by Benjamin Peterson in"
29803061" :issue:`17853`.)"
29813062msgstr ""
3063+ "增加了新的操作码 :opcode:`LOAD_CLASSDEREF`,用于修复一个在类体中加载自由变量的程序错误,它可能因 "
3064+ ":ref:`__prepare__ <prepare>` 的特定用法而触发。 (由 Benjamin Peterson 在 :issue:`17853`"
3065+ " 中贡献。)"
29823066
29833067#: ../../whatsnew/3.4.rst:1988
29843068msgid ""
29853069"A number of MemoryError-related crashes were identified and fixed by Victor "
29863070"Stinner using his :pep:`445`-based ``pyfailmalloc`` tool (:issue:`18408`, "
29873071":issue:`18520`)."
29883072msgstr ""
3073+ "多个有关 MemoryError 的崩溃问题被 Victor Stinner 使用他基于 :pep:`445` 的 ``pyfailmalloc`` "
3074+ "工具加以确定并修复 (:issue:`18408`, :issue:`18520`)。"
29893075
29903076#: ../../whatsnew/3.4.rst:1992
29913077msgid ""
29923078"The ``pyvenv`` command now accepts a ``--copies`` option to use copies "
29933079"rather than symlinks even on systems where symlinks are the default. "
29943080"(Contributed by Vinay Sajip in :issue:`18807`.)"
29953081msgstr ""
3082+ "现在 ``pyvenv`` 命令接受一个 ``--copies`` 选项以使用拷贝而不是符号链接,即使在默认使用符号链接的系统上也是如此。 (由 "
3083+ "Vinay Sajip 在 :issue:`18807` 中贡献。)"
29963084
29973085#: ../../whatsnew/3.4.rst:1996
29983086msgid ""
0 commit comments