@@ -1175,20 +1175,24 @@ msgstr "清理了 :mod:`random` 模块:移除 :func:`!jumpahead` API。"
1175
1175
1176
1176
#: ../../whatsnew/3.0.rst:651
1177
1177
msgid "The :mod:`!new` module is gone."
1178
- msgstr ""
1178
+ msgstr ":mod:`!new` 模块已不复存在。 "
1179
1179
1180
1180
#: ../../whatsnew/3.0.rst:653
1181
1181
msgid ""
1182
1182
"The functions :func:`!os.tmpnam`, :func:`!os.tempnam` and "
1183
1183
":func:`!os.tmpfile` have been removed in favor of the :mod:`tempfile` "
1184
1184
"module."
1185
1185
msgstr ""
1186
+ ":func:`!os.tmpnam`, :func:`!os.tempnam` 和 :func:`!os.tmpfile` 等函数已被移除并应改用 "
1187
+ ":mod:`tempfile` 模块。"
1186
1188
1187
1189
#: ../../whatsnew/3.0.rst:657
1188
1190
msgid ""
1189
1191
"The :mod:`tokenize` module has been changed to work with bytes. The main "
1190
1192
"entry point is now :func:`tokenize.tokenize`, instead of generate_tokens."
1191
1193
msgstr ""
1194
+ ":mod:`tokenize` 模块已被修改以适用于字节串。 主入口点现在是 :func:`tokenize.tokenize`,而不是 "
1195
+ "generate_tokens。"
1192
1196
1193
1197
#: ../../whatsnew/3.0.rst:661
1194
1198
msgid ""
@@ -1198,6 +1202,9 @@ msgid ""
1198
1202
"friends had locale-specific behavior, which is a bad idea for such "
1199
1203
"attractively named global\" constants\" .)"
1200
1204
msgstr ""
1205
+ ":data:`!string.letters` 及其同类 (:data:`!string.lowercase` 和 "
1206
+ ":data:`!string.uppercase`) 已不复存在。 请改用 :data:`string.ascii_letters` 等。 (移除 "
1207
+ ":data:`!string.letters` 及其同类的原因在于它们具有语言区域专属的行为,对于这些被称为全局“常量”的对象来说不是好主意。)"
1201
1208
1202
1209
#: ../../whatsnew/3.0.rst:668
1203
1210
msgid ""
@@ -1206,10 +1213,13 @@ msgid ""
1206
1213
"most global namespaces is unchanged. To modify a builtin, you should use "
1207
1214
":mod:`builtins`, not :data:`!__builtins__`!"
1208
1215
msgstr ""
1216
+ "模块 :mod:`!__builtin__` 被重命名为 :mod:`builtins` (移除了下划线,添加了 's')。 大多数全局命名空间中的 "
1217
+ ":data:`!__builtins__` 变量保持不变。 要修改内置对象,你应当使用 :mod:`builtins`,而不是 "
1218
+ ":data:`!__builtins__`!"
1209
1219
1210
1220
#: ../../whatsnew/3.0.rst:675
1211
1221
msgid ":pep:`3101`: A New Approach To String Formatting"
1212
- msgstr ""
1222
+ msgstr ":pep:`3101`: 字符串格式化的新方式 "
1213
1223
1214
1224
#: ../../whatsnew/3.0.rst:677
1215
1225
msgid ""
@@ -1218,16 +1228,18 @@ msgid ""
1218
1228
"supported; it will be deprecated in Python 3.1 and removed from the "
1219
1229
"language at some later time.) Read :pep:`3101` for the full scoop."
1220
1230
msgstr ""
1231
+ "一种针对内置字符串格式化操作的新系统替代了 ``%`` 字符串格式化运算符。 (不过,``%`` 运算符仍然受到支持;它将在 Python 3.1 "
1232
+ "中被弃用并在今后某一时刻从语言特性中移除。) 请参阅 :pep:`3101` 了解详情。"
1221
1233
1222
1234
#: ../../whatsnew/3.0.rst:685
1223
1235
msgid "Changes To Exceptions"
1224
- msgstr ""
1236
+ msgstr "对异常的修改 "
1225
1237
1226
1238
#: ../../whatsnew/3.0.rst:687
1227
1239
msgid ""
1228
1240
"The APIs for raising and catching exception have been cleaned up and new "
1229
1241
"powerful features added:"
1230
- msgstr ""
1242
+ msgstr "用于引发和捕获异常的 API 已经过清理并增加了强大的新特性: "
1231
1243
1232
1244
#: ../../whatsnew/3.0.rst:690
1233
1245
msgid ""
@@ -1238,6 +1250,9 @@ msgid ""
1238
1250
"be raised, and placed no restriction on what you can catch.) As a "
1239
1251
"consequence, string exceptions are finally truly and utterly dead."
1240
1252
msgstr ""
1253
+ ":pep:`352`: 所有异常都必须(直接或间接地)派生自 :exc:`BaseException`。 这是异常层级结构的根对象。 "
1254
+ "作为推荐方式这并不是新的变化,但 *必须* 从 :exc:`BaseException` 继承是新的变化。 (Python 2.6 "
1255
+ "仍然允许引发经典类,并且不限制你能捕获的异常。) 作为此变化的结果,字符串异常终于真正彻底地死亡了。"
1241
1256
1242
1257
#: ../../whatsnew/3.0.rst:698
1243
1258
msgid ""