8000 [po] auto sync · python/python-docs-zh-cn@0a785c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a785c2

Browse files
[po] auto sync
1 parent f4db94a commit 0a785c2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.38%", "updated_at": "2024-03-27T01:36:33Z"}
1+
{"translation": "92.38%", "updated_at": "2024-03-28T02:25:59Z"}

whatsnew/3.4.po

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,13 +1112,20 @@ msgid ""
11121112
"recommended only for utility scripts because it affects the global state of "
11131113
":data:`sys.stdout`. (Contributed by Raymond Hettinger in :issue:`15805`.)"
11141114
msgstr ""
1115+
"新增的 :func:`contextlib.redirect_stdout` 上下文管理器使得工具脚本能更容易地处理将输出写入 "
1116+
":data:`sys.stdout` 并且不提供任何重定向选项的不灵活 API。 使用该上下文管理器,可以将 :data:`sys.stdout` "
1117+
"的输出重定向到任何其他流,或者配合使用 :class:`io.StringIO` 来重定向到字符串。 后一种方式有时会特别有用,例如写入函数的输出来实现"
1118+
" 命令行接口。 由于它会影响 :data:`sys.stdout` 的全局状态因此只推荐用于工具脚本。 (由 Raymond Hettinger 在 "
1119+
":issue:`15805` 中贡献。)"
11151120

11161121
#: ../../whatsnew/3.4.rst:698
11171122
msgid ""
11181123
"The :mod:`contextlib` documentation has also been updated to include a "
11191124
":ref:`discussion <single-use-reusable-and-reentrant-cms>` of the differences"
11201125
" between single use, reusable and reentrant context managers."
11211126
msgstr ""
1127+
":mod:`contextlib` 文档也已获得更新以包括有关仅单用、可重用与可重入上下文管理器之间的区别的 :ref:`讨论 <single-use-"
1128+
"reusable-and-reentrant-cms>`。"
11221129

11231130
#: ../../whatsnew/3.4.rst:704
11241131
msgid "dbm"
@@ -1131,6 +1138,9 @@ msgid ""
11311138
"object will be called automatically at the end of the block. (Contributed "
11321139
"by Claudiu Popa and Nick Coghlan in :issue:`19282`.)"
11331140
msgstr ""
1141+
"现在 :func:`dbm.open` 对象已支持上下文管理器协议。 当在 :keyword:`with` 语句中使用时,数据库对象的 "
1142+
"``close`` 方法将在代码块结束时被自动调用。 (由 Claudiu Popa 和 Nick Coghlan 在 :issue:`19282` "
1143+
"中贡献。)"
11341144

11351145
#: ../../whatsnew/3.4.rst:713
11361146
msgid "dis"

0 commit comments

Comments
 (0)
0