@@ -13,7 +13,7 @@ msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.11\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2024-04-05 16:47 +0000\n "
16+ "POT-Creation-Date : 2024-04-12 16:41 +0000\n "
1717"PO-Revision-Date : 2023-05-24 02:23+0000\n "
1818"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
1919"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -1276,6 +1276,10 @@ msgid ""
12761276":mod:`~email.generator` in order to pass formatting parameters to its "
12771277"``flatten`` method. (Contributed by R. David Murray in :issue:`18600`.)"
12781278msgstr ""
1279+ "现在 :meth:`~email.message.Message.as_string` 接受一个 *policy* "
1280+ "参数用于在生成其字符串表示形式时重写默认的消息策略。 这意味着 ``as_string`` 现在可以在更多情况下被使用,而不必创建和使用 "
1281+ ":mod:`~email.generator` 来将已格式化的形参传递给其 ``flatten`` 方法。 (由 R. David Murray 在 "
1282+ ":issue:`18600` 中贡献。)"
12791283
12801284#: ../../whatsnew/3.4.rst:802
12811285msgid ""
@@ -1288,6 +1292,11 @@ msgid ""
12881292"intuitive result: a bytes object containing the fully formatted message. "
12891293"(Contributed by R. David Murray in :issue:`18600`.)"
12901294msgstr ""
1295+ "新增方法 :meth:`~email.message.Message.as_bytes` 用于产生消息的与 ``as_string`` "
1296+ "所产生的字符串表示形式类似的字节串表示形式。 它不接受 *maxheaderlen* 参数,但接受 *unixfrom* 和 *policy* 参数。 "
1297+ ":class:`~email.message.Message` 的 :meth:`~email.message.Message.__bytes__` "
1298+ "方法将调用它,这意味着现在 ``bytes(mymsg)`` 将产生直观的结果:一个包含完整已格式化消息的字节串对象。 (由 R. David "
1299+ "Murray 在 :issue:`18600` 中贡献。)"
12911300
12921301#: ../../whatsnew/3.4.rst:811
12931302msgid ""
@@ -1297,6 +1306,9 @@ msgid ""
12971306"the default is ``False``. (Contributed by R. David Murray in "
12981307":issue:`18891`.)"
12991308msgstr ""
1309+ "现在 :meth:`.Message.set_param` 消息接受一个 *replace* 关键字参数。 "
1310+ "当指定该参数时,关联的标头将被更新而不会修改其在标头列表中的位置。 为了保持向下兼容,该参数默认值为 ``False``。 (由 R. David "
1311+ "Murray 在 :issue:`18891` 中贡献。)"
13001312
13011313#: ../../whatsnew/3.4.rst:819
13021314msgid ""
@@ -1314,6 +1326,14 @@ msgid ""
13141326" final in Python 3.5 (possibly with a few minor additions in the area of "
13151327"error handling). (Contributed by R. David Murray in :issue:`18891`.)"
13161328msgstr ""
1329+ "新增了一对 :class:`~email.message.Message` 的子类 (:class:`.EmailMessage` 和 "
1330+ ":class:`.MIMEPart`),以及新的子模块 :mod:`~email.contentmanager` 和新的 "
1331+ ":mod:`~email.policy` 属性 :attr:`~email.policy.EmailPolicy.content_manager`。 "
1332+ "所有文档目前都在新模块中,它是作为 email 的新 :term:`provisional API` 的一部分添加的。 "
1333+ "这些类提供了多个使从内容提取邮件消息和插入内容到消息更容易的新方法。 相关细节,请参阅 :mod:`~email.contentmanager` 文档和"
1334+ " :ref:`email-examples`。 这些 API 的加入完成了作为 email6 项目计划组成部分的大部分工作。 目前的暂定 API 计划在"
1335+ " Python 3.5 最终确定 (可能在错误处理方面再增加少量内容)。 (由 R. David Murray 在 :issue:`18891` "
1336+ "中贡献。)"
13171337
13181338#: ../../whatsnew/3.4.rst:835
13191339msgid "filecmp"
@@ -1328,6 +1348,10 @@ msgid ""
13281348"less time than the resolution of a particular filesystem's file modification"
13291349" time field. (Contributed by Mark Levitt in :issue:`18149`.)"
13301350msgstr ""
1351+ "新增的 :func:`~filecmp.clear_cache` 函数提供了清除 :mod:`filecmp` 比较缓存的功能,它使用 "
1352+ ":func:`os.stat` 信息来确定文件自上次比较后是否发生了更改。 "
1353+ "例如,如果文件被修改和重新检查的时间短于特定文件系统文件修改时间的精度就可使用这一功能。 (由 Mark Levitt 在 :issue:`18149`"
1354+ " 中贡献。)"
13311355
13321356#: ../../whatsnew/3.4.rst:844
13331357msgid ""
@@ -1336,6 +1360,8 @@ msgid ""
13361360" the :func:`~filecmp.dircmp` function. (Contributed by Eli Bendersky in "
13371361":issue:`15442`.)"
13381362msgstr ""
1363+ "新增的模块属性 :const:`~filecmp.DEFAULT_IGNORES` 提供了作为 :func:`~filecmp.dircmp` 函数的 "
1364+ "*ignore* 形参默认值的目录列表。 (由 Eli Bendersky 在 :issue:`15442` 中贡献。)"
13391365
13401366#: ../../whatsnew/3.4.rst:851
13411367msgid "functools"
@@ -1350,6 +1376,10 @@ msgid ""
13501376"normal instance methods when included in a class definition. (Contributed by"
13511377" Alon Horev and Nick Coghlan in :issue:`4331`.)"
13521378msgstr ""
1379+ "新增的 :func:`~functools.partialmethod` 描述器提供了对描述器的部分参数应用,就像 "
1380+ ":func:`~functools.partial` 为普通可调用对象提供的一样。 新的描述器还可以让任意可调用对象 (包括 "
1381+ ":func:`~functools.partial` 实例)在包括在类定义中时表现得像普通的实例方法一样。 (由 Alon Horev 和 Nick "
1382+ "Coghlan 在 :issue:`4331` 中贡献。)"
13531383
13541384#: ../../whatsnew/3.4.rst:862
13551385msgid ""
@@ -1360,6 +1390,8 @@ msgid ""
13601390"multiple implementations of an operation that allows it to work with "
13611391"*different* kinds of data."
13621392msgstr ""
1393+ "新增的 :func:`~functools.singledispatch` 装饰器为 Python 标准库带来了对单分派泛型函数的支持。 "
1394+ "面向对象编程侧重于将对一组共同数据的多种操作组合到一个类中,而泛型函数则侧重于将一种操作的多个实现组合在一起使其能够处理 *不同* 种类的数据。"
13631395
13641396#: ../../whatsnew/3.4.rst:871
13651397msgid ":pep:`443` -- Single-dispatch generic functions"
@@ -1425,6 +1457,9 @@ msgid ""
14251457"based key derivation function 2 <https://en.wikipedia.org/wiki/PBKDF2>`_. "
14261458"(Contributed by Christian Heimes in :issue:`18582`.)"
14271459msgstr ""
1460+ "新增的 :func:`hashlib.pbkdf2_hmac` 函数提供了 `PKCS#5 基于口令的密钥派生函数 2 "
1461+ "<https://en.wikipedia.org/wiki/PBKDF2>`_。 (由 Christian Heimes 在 "
1462+ ":issue:`18582` 中贡献。)"
14281463
14291464#: ../../whatsnew/3.4.rst:908
14301465msgid ""
@@ -1435,6 +1470,9 @@ msgid ""
14351470"Python implementations have not previously supported it. (Contributed by "
14361471"Jason R. Coombs in :issue:`18532`.)"
14371472msgstr ""
1473+ "现在 :mod:`hashlib` 哈希对象的 :attr:`~hashlib.hash.name` 属性已成为受正式支持的接口。 它一直存在于 "
1474+ "CPython 的 :mod:`hashlib` 中(尽管它没有返回所有受支持的哈希算法的小写名称),但它不是一个公开的接口因此其他一些 Python "
1475+ "实现以前并不支持它。 (由 Jason R. Coombs 在 :issue:`18532` 中提供。)"
14381476
14391477#: ../../whatsnew/3.4.rst:917
14401478msgid "hmac"
@@ -1448,6 +1486,9 @@ msgid ""
14481486"accepts any type supported by the :mod:`hashlib` module. (Contributed by "
14491487"Jonas Borgström in :issue:`18240`.)"
14501488msgstr ""
1489+ "现在 :mod:`hmac` 可接受 ``bytearray`` 和 ``bytes`` 作为传给 :func:`~hmac.new` 函数的 "
1490+ "*key* 参数,而传给 :func:`~hmac.new` 函数和 :meth:`~hmac.HMAC.update` 方法的 *msg* "
1491+ "形参现在可接受 :mod:`hashlib` 模块所支持的任何类型。 (由 Jonas Borgström 的 :issue:`18240` 中贡献。)"
14511492
14521493#: ../../whatsnew/3.4.rst:925
14531494msgid ""
@@ -1457,6 +1498,9 @@ msgid ""
14571498"deprecated: in a future version of Python there will be no default value. "
14581499"(Contributed by Christian Heimes in :issue:`17276`.)"
14591500msgstr ""
1501+ "传给 :func:`hmac.new` 函数的 *digestmod* 参数现在可以是 :mod:`hashlib` 能识别的任何哈希摘要名称。 "
1502+ "此外,当前将 *digestmod* 默认值设为 ``MD5`` 的行为已被弃用:在未来的 Python 版本中将没有默认值。 (由 Christian"
1503+ " Heimes 在 :issue:`17276` 中贡献。)"
14601504
14611505#: ../../whatsnew/3.4.rst:931
14621506msgid ""
@@ -1466,6 +1510,9 @@ msgid ""
14661510"conforms fully to the :pep:`247` API. (Contributed by Christian Heimes in "
14671511":issue:`18775`.)"
14681512msgstr ""
1513+ "由于增加了 :attr:`~hmac.HMAC.block_size` 和 :attr:`~hmac.HMAC.name` 属性 (以及 "
1514+ ":attr:`~hmac.HMAC.digest_size` 属性的正式文档),:mod:`hmac` 模块现在已完全符合 :pep:`247` "
1515+ "API。 (由 Christian Heimes 在 :issue:`18775` 中贡献。)"
14691516
14701517#: ../../whatsnew/3.4.rst:938
14711518msgid "html"
@@ -1489,12 +1536,17 @@ msgid ""
14891536"invited to set it explicitly and update your code to use this new feature. "
14901537"(Contributed by Ezio Melotti in :issue:`13633`.)"
14911538msgstr ""
1539+ ":class:`~html.parser.HTMLParser` 接受新的关键字参数 *convert_charrefs*,当其为 ``True`` "
1540+ "时,会自动转换所有字符引用。 为了保持向下兼容,其值默认为 ``False``,但在未来的 Python 版本中将改为 "
1541+ "``True``,因此建议你显式地设置它并更新代码以使用这个新特性。 (由 Ezio Melotti 在 :issue:`13633` 中贡献。)"
14921542
14931543#: ../../whatsnew/3.4.rst:951
14941544msgid ""
14951545"The *strict* argument of :class:`~html.parser.HTMLParser` is now deprecated."
14961546" (Contributed by Ezio Melotti in :issue:`15114`.)"
14971547msgstr ""
1548+ "现在 :class:`~html.parser.HTMLParser` 的 *strict* 参数已被弃用。 (由 Ezio Melotti 在 "
1549+ ":issue:`15114` 中贡献。)"
14981550
14991551#: ../../whatsnew/3.4.rst:956
15001552msgid "http"
@@ -1688,6 +1740,8 @@ msgid ""
16881740"parameter that can be used to specify the time of day when rollover should "
16891741"happen. (Contributed by Ronald Oussoren in :issue:`9556`.)"
16901742msgstr ""
1743+ ":class:`~logging.handlers.TimedRotatingFileHandler` 新增的 *atTime* "
1744+ "形参可被用于指定每日要执行日志文件轮转的时间。 (由 Ronald Oussoren 在 :issue:`9556` 中贡献。)"
16911745
16921746#: ../../whatsnew/3.4.rst:1079
16931747msgid ""
@@ -1696,6 +1750,9 @@ msgid ""
16961750"(by setting *port* to ``None``). (Contributed by Vinay Sajip in commit "
16971751"ce46195b56a9.)"
16981752msgstr ""
1753+ "现在 :class:`~logging.handlers.SocketHandler` 和 "
1754+ ":class:`~logging.handlers.DatagramHandler` 已支持 Unix 域套接字 (通过将 *port* 设为 "
1755+ "``None``)。 (由 Vinay Sajip 在 commit ce46195b56a9 中贡献。)"
16991756
17001757#: ../../whatsnew/3.4.rst:1084
17011758msgid ""
@@ -2264,6 +2321,11 @@ msgid ""
22642321"(``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`). (Contributed by Christian "
22652322"Heimes in :issue:`19292`.)"
22662323msgstr ""
2324+ "新增的 :class:`~ssl.SSLContext` 方法 :meth:`~ssl.SSLContext.load_default_certs` "
2325+ "可从默认位置加载一组默认的“证书颁发机构”(CA)证书,此位置随平台而异。 它可被用于加载 TLS Web 服务器验证证书 "
2326+ "(``purpose=``:data:`~ssl.Purpose.SERVER_AUTH` ) "
2327+ "供客户端用来验证服务器,或加载证书供服务器用来验证客户端证书 (``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`"
2328+ " )。 (由 Christian Heimes 在 :issue:`19292` 中贡献。)"
22672329
22682330#: ../../whatsnew/3.4.rst:1479
22692331msgid ""
@@ -2331,6 +2393,9 @@ msgid ""
23312393"streamed unpacking of a buffer containing repeated instances of a given "
23322394"format of data. (Contributed by Antoine Pitrou in :issue:`17804`.)"
23332395msgstr ""
2396+ "新增函数 :mod:`~struct.iter_unpack` 和在已编译格式上的新增方法 "
2397+ ":meth:`struct.Struct.iter_unpack` 提供了对包含给定格式数据的重复实例的缓冲区的流式解包功能。 (由 Antoine "
2398+ "Pitrou 在 :issue:`17804` 中贡献。)"
23342399
23352400#: ../../whatsnew/3.4.rst:1517
23362401msgid "subprocess"
@@ -2342,13 +2407,17 @@ msgid ""
23422407" used to provide the contents of ``stdin`` for the command that is run. "
23432408"(Contributed by Zack Weinberg in :issue:`16624`.)"
23442409msgstr ""
2410+ "现在 :func:`~subprocess.check_output` 接受一个 *input* 参数用于为所运行的命令提供 ``stdin`` "
2411+ "的内容。 (由 Zack Weinberg 在 :issue:`16624` 中贡献。)"
23452412
23462413#: ../../whatsnew/3.4.rst:1523
23472414msgid ""
23482415":func:`~subprocess.getstatus` and :func:`~subprocess.getstatusoutput` now "
23492416"work on Windows. This change was actually inadvertently made in 3.3.4. "
23502417"(Contributed by Tim Golden in :issue:`10197`.)"
23512418msgstr ""
2419+ "现在 :func:`~subprocess.getstatus` 和 :func:`~subprocess.getstatusoutput` 已适用于 "
2420+ "Windows。 这一修改是在 3.3.4 中意外实施的。 (由 Tim Golden 在 :issue:`10197` 中贡献。)"
23522421
23532422#: ../../whatsnew/3.4.rst:1529
23542423msgid "sunau"
@@ -2359,6 +2428,8 @@ msgid ""
23592428"The :meth:`~sunau.getparams` method now returns a namedtuple rather than a "
23602429"plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.)"
23612430msgstr ""
2431+ "现在 :meth:`~sunau.getparams` 方法将返回一个具名元组而不是普通元组。 (由 Claudiu Popa 在 "
2432+ ":issue:`18901` 中贡献。)"
23622433
23632434#: ../../whatsnew/3.4.rst:1534
23642435msgid ""
@@ -2367,20 +2438,27 @@ msgid ""
23672438" be called automatically at the end of the block. (Contributed by Serhiy "
23682439"Storchaka in :issue:`18878`.)"
23692440msgstr ""
2441+ "现在 :meth:`sunau.open` 已支持上下文管理协议:当在 :keyword:`with` 代码块中使用时,所返回对象的 ``close``"
2442+ " 方法将在代码块结束时被自动调用。 (由 Serhiy Storchaka 在 :issue:`18878` 中贡献。)"
23702443
23712444#: ../../whatsnew/3.4.rst:1539
23722445msgid ""
23732446":meth:`.AU_write.setsampwidth` now supports 24 bit samples, thus adding "
23742447"support for writing 24 sample using the module. (Contributed by Serhiy "
23752448"Storchaka in :issue:`19261`.)"
23762449msgstr ""
2450+ "现在 :meth:`.AU_write.setsampwidth` 已支持 24 位采样,因此增加了使用该模块写入 24 位采样的支持。 (由 "
2451+ "Serhiy Storchaka 在 :issue:`19261` 中贡献。)"
23772452
23782453#: ../../whatsnew/3.4.rst:1543
23792454msgid ""
23802455"The :meth:`~sunau.AU_write.writeframesraw` and "
23812456":meth:`~sunau.AU_write.writeframes` methods now accept any :term:`bytes-like"
23822457" object`. (Contributed by Serhiy Storchaka in :issue:`8311`.)"
23832458msgstr ""
2459+ "现在 :meth:`~sunau.AU_write.writeframesraw` 和 "
2460+ ":meth:`~sunau.AU_write.writeframes` 方法将接受任意 :term:`bytes-like object`。 (由 "
2461+ "Serhiy Storchaka 在 :issue:`8311` 中贡献。)"
23842462
23852463#: ../../whatsnew/3.4.rst:1549
23862464msgid "sys"
@@ -2395,6 +2473,9 @@ msgid ""
23952473"leaks, especially if automated via a test suite. (Contributed by Antoine "
23962474"Pitrou in :issue:`13390`.)"
23972475msgstr ""
2476+ "新增函数 :func:`sys.getallocatedblocks` 可返回当前由解释器所分配的内存块数量。 (在使用默认 ``--with-"
2477+ "pymalloc`` 设置的 CPython 中,这将是通过 :c:func:`PyObject_Malloc` API 执行的分配。) "
2478+ "这在追踪内存泄漏时会很有用处,特别是对于通过测试套件自动追踪的场景。 (由 Antoine Pitrou 在 :issue:`13390` 中贡献。)"
23982479
23992480#: ../../whatsnew/3.4.rst:1558
24002481msgid ""
@@ -2984,6 +3065,8 @@ msgid ""
29843065"now works correctly (previously it silently returned the first python module"
29853066" in the file). (Contributed by Václav Šmilauer in :issue:`16421`.)"
29863067msgstr ""
3068+ "现在将能够正确地从单个 OS 模块加载多个 (``.so``, ``.dll``) python 模块(在之前版本中则会静默地返回文件中的第一个 "
3069+ "python 模块)。 (由 Václav Šmilauer 在 :issue:`16421` 中贡献。)"
29873070
29883071#: ../../whatsnew/3.4.rst:1983
29893072msgid ""
@@ -2992,20 +3075,27 @@ msgid ""
29923075" uses of :ref:`__prepare__ <prepare>`. (Contributed by Benjamin Peterson in"
29933076" :issue:`17853`.)"
29943077msgstr ""
3078+ "增加了新的操作码 :opcode:`LOAD_CLASSDEREF`,用于修复一个在类体中加载自由变量的程序错误,它可能因 "
3079+ ":ref:`__prepare__ <prepare>` 的特定用法而触发。 (由 Benjamin Peterson 在 :issue:`17853`"
3080+ " 中贡献。)"
29953081
29963082#: ../../whatsnew/3.4.rst:1988
29973083msgid ""
29983084"A number of MemoryError-related crashes were identified and fixed by Victor "
29993085"Stinner using his :pep:`445`-based ``pyfailmalloc`` tool (:issue:`18408`, "
30003086":issue:`18520`)."
30013087msgstr ""
3088+ "多个有关 MemoryError 的崩溃问题被 Victor Stinner 使用他基于 :pep:`445` 的 ``pyfailmalloc`` "
3089+ "工具加以确定并修复 (:issue:`18408`, :issue:`18520`)。"
30023090
30033091#: ../../whatsnew/3.4.rst:1992
30043092msgid ""
30053093"The ``pyvenv`` command now accepts a ``--copies`` option to use copies "
30063094"rather than symlinks even on systems where symlinks are the default. "
30073095"(Contributed by Vinay Sajip in :issue:`18807`.)"
30083096msgstr ""
3097+ "现在 ``pyvenv`` 命令接受一个 ``--copies`` 选项以使用拷贝而不是符号链接,即使在默认使用符号链接的系统上也是如此。 (由 "
3098+ "Vinay Sajip 在 :issue:`18807` 中贡献。)"
30093099
30103100#: ../../whatsnew/3.4.rst:1996
30113101msgid ""
0 commit comments