Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f4b577

Browse files
[po] auto sync
1 parent 00fc400 commit 7f4b577

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.08%", "updated_at": "2023-09-24T02:57:15Z"}
1+
{"translation": "91.10%", "updated_at": "2023-09-24T07:56:53Z"}

whatsnew/3.12.po

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ msgid ""
223223
"multiple lines), making them harder to read. In Python 3.12 you can now "
224224
"define f-strings spanning multiple lines, and add inline comments:"
225225
msgstr ""
226+
"多行表达式和注释:在 Python 3.11 中,f-字符串表达式必须在一行中完成定义,即使 "
227+
"f-字符串中的表达式在正常情况下可以跨多行(如在多行中定义的列表字面值),这使得它们更难被读懂。 在 Python 3.12 "
228+
"中,你现在可以定义跨越多行的 f-字符串并添加内联注释:"
226229

227230
#: ../../whatsnew/3.12.rst:199
228231
msgid ""
@@ -233,6 +236,9 @@ msgid ""
233236
"expression components of f-strings. Now, you can define expressions like "
234237
"this:"
235238
msgstr ""
239+
"反斜框和 unicode 字符:在 Python 3.12 之前,f-字符串表达式不能包含任何 ``\\`` 字符。 这也影响了 unicode "
240+
":ref:`转义序列 <escape-sequences>` (如 ``\\N{snowman}``),因为这些序列包含 ``\\N`` "
241+
"部分,而这部分以前不能作为 f-字符串表达式组件的一部分。 现在,你可以这样定义表达式:"
236242

237243
#: ../../whatsnew/3.12.rst:212
238244
msgid "See :pep:`701` for more details."
@@ -245,6 +251,9 @@ msgid ""
245251
"f-strings are more precise and include the exact location of the error. For "
246252
"example, in Python 3.11, the following f-string raises a :exc:`SyntaxError`:"
247253
msgstr ""
254+
"实现此功能的一个正面的附带影响是 (通过使用 :pep:`PEG 解析器 <617>` 来解析 f-字符串),现在 "
255+
"f-字符串的错误消息会更加精确,包括错误的确切位置。 例如,在 Python 3.11 中,下面的 f-字符串将引发一个 "
256+
":exc:`SyntaxError`:"
248257

249258
#: ../../whatsnew/3.12.rst:227
250259
msgid ""
@@ -277,13 +286,15 @@ msgid ""
277286
"comprehension. This speeds up execution of a comprehension by up to two "
278287
"times. See :pep:`709` for further details."
279288
msgstr ""
289+
"字典、列表和集合推导式现在都是内联的,而不是为每次执行推导式都创建一个新的一次性函数对象。 这样可以将推导式的执行速度提高最多两倍。 更多细节请参阅 "
290+
":pep:`709`。"
280291

281292
#: ../../whatsnew/3.12.rst:253
282293
msgid ""
283294
"Comprehension iteration variables remain isolated and don't overwrite a "
284295
"variable of the same name in the outer scope, nor are they visible after the"
285296
" comprehension. Inlining does result in a few visible behavior changes:"
286-
msgstr ""
297+
msgstr "推导式迭代变量将保持隔离而不会覆盖外作用域中的同名变量,在离开推导式后也不再可见。 内联确实会导致一些可见的行为变化:"
287298

288299
#: ../../whatsnew/3.12.rst:257
289300
msgid ""
@@ -359,6 +370,9 @@ msgid ""
359370
"CPU cores. This is currently only available through the C-API, though a "
360371
"Python API is :pep:`anticipated for 3.13 <554>`."
361372
msgstr ""
373+
":pep:`684` 引入了解释器级的 :term:`GIL <global interpreter lock>`,使得现在可以创建带有独立的解释器级 "
374+
"GIL 的子解释器。 这将允许 Python 程序充分利用多个 CPU 核心。 此特性目前仅能通过 C-API 使用,不过相应的 Python API "
375+
":pep:`预计将在 3.13 中添加 <554>`。"
362376

363377
#: ../../whatsnew/3.12.rst:300
364378
msgid ""
@@ -391,6 +405,9 @@ msgid ""
391405
"near-zero overhead debuggers and coverage tools. See :mod:`sys.monitoring` "
392406
"for details."
393407
msgstr ""
408+
":pep:`669` 定义了一个新的 :mod:`API <sys.monitoring>` 用于性能分析器、调试器和其他在 CPython "
409+
"中监控事件的工具。 它覆盖了大范围的事件,包括调用、返回、行、异常、跳转等等。 "
410+
"这意味着你将只为你所使用的东西付出开销,提供了对近乎零开销的调试器和覆盖工具的支持。 请参阅 :mod:`sys.monitoring` 了解详情。"
394411

395412
#: ../../whatsnew/3.12.rst:332
396413
msgid "(Contributed by Mark Shannon in :gh:`103083`.)"
@@ -404,7 +421,7 @@ msgstr "有关类型提示的新增特性"
404421
msgid ""
405422
"This section covers major changes affecting :pep:`type hints <484>` and the "
406423
":mod:`typing` module."
407-
msgstr ""
424+
msgstr "本节介绍了影响 :pep:`类型提示 <484>` 和 :mod:`typing` 模块的主要更改。"
408425

409426
#: ../../whatsnew/3.12.rst:343
410427
msgid "PEP 692: Using ``TypedDict`` for more precise ``**kwargs`` typing"
@@ -423,7 +440,7 @@ msgstr ""
423440
msgid ""
424441
":pep:`692` specifies a more precise way of typing ``**kwargs`` by relying on"
425442
" typed dictionaries::"
426-
msgstr ""
443+
msgstr ":pep:`692` 通过依赖类型化的字典规定了一种更精确的针对 ``**kwargs`` 的类型标注方式::"
427444

428445
#: ../../whatsnew/3.12.rst:360
429446
msgid "See :pep:`692` for more details."
@@ -509,6 +526,8 @@ msgid ""
509526
"evaluation <lazy-evaluation>`). This means type aliases are able to refer to"
510527
" other types defined later in the file."
511528
msgstr ""
529+
"类型别名的值以及通过此语法创建的类型变量的边界和约束仅在需要时才进行求值 (参见 :ref:`惰性求值 <lazy-evaluation>`)。 "
530+
"这意味着类型别名可以引用稍后在文件中定义的其他类型。"
512531

513532
#: ../../whatsnew/3.12.rst:443
514533
msgid ""

0 commit comments

Comments
 (0)