@@ -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-26 19:05 +0000\n "
15
+ "POT-Creation-Date : 2024-05-03 18:41 +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 "
@@ -1790,6 +1790,10 @@ msgid ""
1790
1790
":func:`~logging.config.fileConfig`. (Contributed by Vinay Sajip in "
1791
1791
":issue:`16110`.)"
1792
1792
msgstr ""
1793
+ "现在 :func:`~logging.config.fileConfig` 接受一个 "
1794
+ ":class:`configparser.RawConfigParser` 子类实例作为 *fname* 形参。 "
1795
+ "这有助于在日志配置只是整体应用程序配置的一部分,或者在将配置传递给 :func:`~logging.config.fileConfig` "
1796
+ "之前对其进行了修改时使用配置文件。 (由 Vinay Sajip 在 :issue:`16110` 中贡献。)"
1793
1797
1794
1798
#: ../../whatsnew/3.4.rst:1092
1795
1799
msgid ""
@@ -1798,6 +1802,8 @@ msgid ""
1798
1802
"processed by supplying a verification function as the argument to the new "
1799
1803
"*verify* keyword argument. (Contributed by Vinay Sajip in :issue:`15452`.)"
1800
1804
msgstr ""
1805
+ "现在通过 :func:`logging.config.listen` 函数从套接字接收的日志配置数据可以在处理前以将验证函数作为参数提供给新的 "
1806
+ "*verify* 关键字参数 的方式执行验证。 (由 Vinay Sajip 在 :issue:`15452` 中贡献。)"
1801
1807
1802
1808
#: ../../whatsnew/3.4.rst:1101
1803
1809
msgid "marshal"
@@ -1815,6 +1821,10 @@ msgid ""
1815
1821
"Valur Jónsson in :issue:`16475`, with additional speedups by Antoine Pitrou "
1816
1822
"in :issue:`19219`.)"
1817
1823
msgstr ""
1824
+ "默认的 :mod:`marshal` 版本已被提升至 3。 新版本的代码实现恢复了 Python2 "
1825
+ "行为即只记录内联字符串的一份副本并在反序列化时保留内联状态,并将此“一份副本”功能扩展到任何对象类型(包括处理递归引用)。 这既减少了 ``.pyc``"
1826
+ " 文件的大小也减少了模块从 ``.pyc`` (或``.pyo``) 文件加载时占用的内存量。 (由 Kristján Valur Jónsson 在 "
1827
+ ":issue:`16475` 中贡献,并由 Antoine Pitrou 在 :issue:`19219` 中提供进一步的加速。)"
1818
1828
1819
1829
#: ../../whatsnew/3.4.rst:1114
1820
1830
msgid "mmap"
@@ -1842,6 +1852,13 @@ msgid ""
1842
1852
" the current start method, and :func:`~multiprocessing.set_start_method` "
1843
1853
"sets the start method. (Contributed by Richard Oudkerk in :issue:`8713`.)"
1844
1854
msgstr ""
1855
+ "在 Unix 上新增了两个 :ref:`启动方法 <multiprocessing-start-methods>` ``spawn`` 和 "
1856
+ "``forkserver`` 可使用 :mod:`multiprocessing` 来启动进程。 这两个方法使得进程和线程的混合更为健壮,并且 "
1857
+ "``spawn`` 方法可以匹配 multiprocessing 在 Windows 上一直使用的语法。 新增的函数 "
1858
+ ":func:`~multiprocessing.get_all_start_methods` "
1859
+ "可报告平台上可用的所有启动方法,:func:`~multiprocessing.get_start_method` 可报告当前的启动方法,而 "
1860
+ ":func:`~multiprocessing.set_start_method` 可设置启动方法。 (由 Richard Oudkerk 在 "
1861
+ ":issue:`8713` 中贡献。)"
1845
1862
1846
1863
#: ../../whatsnew/3.4.rst:1135
1847
1864
msgid ""
@@ -1855,13 +1872,19 @@ msgid ""
1855
1872
"use multiprocessing without interfering with each other. (Contributed by "
1856
1873
"Richard Oudkerk in :issue:`18999`.)"
1857
1874
msgstr ""
1875
+ "现在 :mod:`multiprocessing` 还具有 ``上下文`` 的概念,它决定了子进程的创建方式。 新增的函数 "
1876
+ ":func:`~multiprocessing.get_context` 可返回一个使用指定启动方法的上下文。 它具有与 "
1877
+ ":mod:`multiprocessing` 模块本身一致的 API,因此你可以使用它来创建 "
1878
+ ":class:`~multiprocessing.pool.Pool` 和其他在上下文中执行操作的对象。 "
1879
+ "这允许一个框架和某个应用程序或相同应用程序的不同部分使用多进程而不会彼此干扰。 (由 Richard Oudkerk 在 :issue:`18999` "
1880
+ "中贡献。)"
1858
1881
1859
1882
#: ../../whatsnew/3.4.rst:1145
1860
1883
msgid ""
1861
1884
"Except when using the old *fork* start method, child processes no longer "
1862
1885
"inherit unneeded handles/file descriptors from their parents (part of "
1863
1886
":issue:`8713`)."
1864
- msgstr ""
1887
+ msgstr "除非是在使用旧的 *fork* 启动方法,子进程将不再从其父进程继承不需要的句柄/文件描述符 (:issue:`8713` 的一部分)。 "
1865
1888
1866
1889
#: ../../whatsnew/3.4.rst:1149
1867
1890
msgid ""
@@ -1872,6 +1895,10 @@ msgid ""
1872
1895
" and explicit relative imports could cause obscure failures in child "
1873
1896
"processes. (Contributed by Nick Coghlan in :issue:`19946`.)"
1874
1897
msgstr ""
1898
+ "现在当使用 ``spawn`` 或 ``forkserver`` 启动方法时 :mod:`multiprocessing` 依赖于 "
1899
+ ":mod:`runpy` (它实现了 ``-m`` 开关) 在子进程中正确地初始化 ``__main__``。 "
1900
+ "这解决了一些合并多进程操作中,``-m`` 命令行开关和显式相对导入可能在子进程中导致失败的边缘场景问题。 (由 Nick Coghlan 在 "
1901
+ ":issue:`19946` 中贡献。)"
1875
1902
1876
1903
#: ../../whatsnew/3.4.rst:1158
1877
1904
msgid "operator"
@@ -1884,13 +1911,18 @@ msgid ""
1884
1911
"should be used, as part of the :pep:`424` formal specification of this "
1885
1912
"language feature. (Contributed by Armin Ronacher in :issue:`16148`.)"
1886
1913
msgstr ""
1914
+ "新增的函数 :func:`~operator.length_hint` 提供了应当如何使用 "
1915
+ ":meth:`~object.__length_hint__` 特殊方法的规范实现,作为该语言特性的 :pep:`424` 正式规范说明的一部分。 (由"
1916
+ " Armin Ronacher 在 :issue:`16148` 中贡献。)"
1887
1917
1888
1918
#: ../../whatsnew/3.4.rst:1165
1889
1919
msgid ""
1890
1920
"There is now a pure-python version of the :mod:`operator` module available "
1891
1921
"for reference and for use by alternate implementations of Python. "
1892
1922
"(Contributed by Zachary Ware in :issue:`16694`.)"
1893
1923
msgstr ""
1924
+ "现在提供了一个纯 Python 版本的 :mod:`operator` 模块,可用于参考并由 Python 的其他实现使用。 (由 Zachary "
1925
+ "Ware 在 :issue:`16694` 中贡献。)"
1894
1926
1895
1927
#: ../../whatsnew/3.4.rst:1171
1896
1928
msgid "os"
@@ -1916,6 +1948,10 @@ msgid ""
1916
1948
"Yogesh Chaudhari, Victor Stinner, and Charles-François Natali in "
1917
1949
":issue:`17914`.)"
1918
1950
msgstr ""
1951
+ "新增函数 :func:`~os.cpu_count` 可报告 Python 运行所在平台上可用 CPU 的数量 (如果无法确定数量则为 "
1952
+ "``None``)。 现在 :func:`multiprocessing.cpu_count` 函数是根据此函数实现的。 (由 Trent "
1953
+ "Nelson, Yogesh Chaudhari, Victor Stinner 和 Charles-François Natali 在 "
1954
+ ":issue:`17914` 中贡献。)"
1919
1955
1920
1956
#: ../../whatsnew/3.4.rst:1184
1921
1957
msgid ""
0 commit comments