@@ -2249,6 +2249,8 @@ msgid ""
2249
2249
":keyword:`!with` block. (Contributed by Filip Gruszczyński in "
2250
2250
":issue:`13896`.)"
2251
2251
msgstr ""
2252
+ "现在 :class:`~shelve.Shelf` 实例可以在 :keyword:`with` 语句中使用,并将在 :keyword:`!with` "
2253
+ "代码块结束时自动关闭。 (由 Filip Gruszczyński 在 :issue:`13896` 中贡献。)"
2252
2254
2253
2255
#: ../../whatsnew/3.4.rst:1360
2254
2256
msgid "shutil"
@@ -2262,6 +2264,9 @@ msgid ""
2262
2264
"this specific error. (Contributed by Atsuo Ishimoto and Hynek Schlawack in "
2263
2265
":issue:`1492704`.)"
2264
2266
msgstr ""
2267
+ "现在当源和目标为相同文件时 :func:`~shutil.copyfile` 会引发专门的 :exc:`~shutil.Error` 子类 "
2268
+ ":exc:`~shutil.SameFileError`,这允许应用程序针对这个特定错误采取适当的动作。 (由 Atsuo Ishimoto 和 "
2269
+ "Hynek Schlawack 在 :issue:`1492704` 中贡献。)"
2265
2270
2266
2271
#: ../../whatsnew/3.4.rst:1370
2267
2272
msgid "smtpd"
@@ -2287,6 +2292,9 @@ msgid ""
2287
2292
"in one try/except statement by code that only cares whether or not an error "
2288
2293
"occurred. (Contributed by Ned Jackson Lovely in :issue:`2118`.)"
2289
2294
msgstr ""
2295
+ "现在 :exc:`~smtplib.SMTPException` 是 :exc:`OSError` 的子类,它允许仅需关注是否有错误发生的代码在一个 "
2296
+ "try/except 语句中同时捕获套接字级错误和 SMTP 协议级错误。 (由 Ned Jackson Lovely 在 :issue:`2118` "
2297
+ "中贡献。)"
2290
2298
2291
2299
#: ../../whatsnew/3.4.rst:1389
2292
2300
msgid "socket"
@@ -2314,6 +2322,8 @@ msgid ""
2314
2322
"values using the new :mod:`enum` module. This allows meaningful names to be"
2315
2323
" printed during debugging, instead of integer \" magic numbers\" ."
2316
2324
msgstr ""
2325
+ "现在 ``socket.AF_*`` 和 ``socket.SOCK_*`` 常量是使用了新增的 :mod:`enum` 模块的枚举值。 "
2326
+ "这允许在调试期间打印有意义的名称,而不是整数形式的“魔法数字”。"
2317
2327
2318
2328
#: ../../whatsnew/3.4.rst:1402
2319
2329
msgid "The :data:`~socket.AF_LINK` constant is now available on BSD and OSX."
0 commit comments