@@ -1274,7 +1274,7 @@ msgstr ""
1274
1274
1275
1275
#: ../../whatsnew/3.0.rst:795
1276
1276
msgid "Builtins"
1277
- msgstr ""
1277
+ msgstr "内置对象 "
1278
1278
1279
1279
#: ../../whatsnew/3.0.rst:797
1280
1280
msgid ""
@@ -1284,6 +1284,8 @@ msgid ""
1284
1284
"automatically be chosen. With arguments, the behavior of :func:`super` is "
1285
1285
"unchanged."
1286
1286
msgstr ""
1287
+ ":pep:`3135`: 新的 :func:`super`。 现在你可以不带参数地唤起 :func:`super` 这样(假定这发生在定义于 "
1288
+ ":keyword:`class` 语句内部的常规实例方法中)将会自动选择正确的类和实例。 附带参数时,:func:`super` 的行为保持不变。"
1287
1289
1288
1290
#: ../../whatsnew/3.0.rst:803
1289
1291
msgid ""
@@ -1298,7 +1300,7 @@ msgstr ""
1298
1300
msgid ""
1299
1301
"A new built-in function :func:`next` was added to call the "
1300
1302
":meth:`~iterator.__next__` method on an object."
1301
- msgstr ""
1303
+ msgstr "新增内置函数 :func:`next` 用于在对象上调用 :meth:`~iterator.__next__` 方法。 "
1302
1304
1303
1305
#: ../../whatsnew/3.0.rst:812
1304
1306
msgid ""
@@ -1310,6 +1312,10 @@ msgid ""
1310
1312
"a single argument and a value of the same type as ``x`` when called with two"
1311
1313
" arguments."
1312
1314
msgstr ""
1315
+ ":func:`round` 函数的舍入策略和返回类型已有改变。 对于两边差值相同的情况现在将会舍入到最接近的偶数结果而不是远离零值的结果。 "
1316
+ "(例如,``round(2.5)`` 现在将返回 ``2`` 而不是 ``3``。) 现在 ``round(x[, n])`` 将委托给 "
1317
+ "``x.__round__([n])`` 而不是始终返回一个浮点数。 它通常会在附带一个参数调用时返回整数而在附带两个参数调用时返回与 ``x`` "
1318
+ "相同类型的值。"
1313
1319
1314
1320
#: ../../whatsnew/3.0.rst:821
1315
1321
msgid "Moved :func:`intern` to :func:`sys.intern`."
@@ -1369,29 +1375,29 @@ msgstr "构建和 C API 的改变"
1369
1375
msgid ""
1370
1376
"Due to time constraints, here is a *very* incomplete list of changes to the "
1371
1377
"C API."
1372
- msgstr ""
1378
+ msgstr "由于时间约束,下面 C API 的变化列表 *非常* 不完整。 "
1373
1379
1374
1380
#: ../../whatsnew/3.0.rst:857
1375
1381
msgid ""
1376
1382
"Support for several platforms was dropped, including but not limited to Mac "
1377
1383
"OS 9, BeOS, RISCOS, Irix, and Tru64."
1378
- msgstr ""
1384
+ msgstr "已放弃对某些平台的支持,包括但不限于 Mac OS 9, BeOS, RISCOS, Irix 和 Tru64。 "
1379
1385
1380
1386
#: ../../whatsnew/3.0.rst:860
1381
1387
msgid ":pep:`3118`: New Buffer API."
1382
1388
msgstr ":pep:`3118`: 新的缓冲区 API。"
1383
1389
1384
1390
#: ../../whatsnew/3.0.rst:862
1385
1391
msgid ":pep:`3121`: Extension Module Initialization & Finalization."
1386
- msgstr ""
1392
+ msgstr ":pep:`3121`: 扩展模块初始化与最终化。 "
1387
1393
1388
1394
#: ../../whatsnew/3.0.rst:864
1389
1395
msgid ":pep:`3123`: Making :c:macro:`PyObject_HEAD` conform to standard C."
1390
- msgstr ""
1396
+ msgstr ":pep:`3123`: 使 :c:macro:`PyObject_HEAD` 与标准 C 一致。 "
1391
1397
1392
1398
#: ../../whatsnew/3.0.rst:866
1393
1399
msgid "No more C API support for restricted execution."
1394
- msgstr ""
1400
+ msgstr "已去除对受限执行的 C API 支持。 "
1395
1401
1396
1402
#: ../../whatsnew/3.0.rst:868
1397
1403
msgid ""
@@ -1407,12 +1413,14 @@ msgid ""
1407
1413
":c:func:`PyImport_ImportModule` but won't block on the import lock "
1408
1414
"(returning an error instead)."
1409
1415
msgstr ""
1416
+ "新的 C API :c:func:`PyImport_ImportModuleNoBlock`,类似于 "
1417
+ ":c:func:`PyImport_ImportModule` 但不会因导入锁而阻塞(改为返回错误)。"
1410
1418
1411
1419
#: ../../whatsnew/3.0.rst:875
1412
1420
msgid ""
1413
1421
"Renamed the boolean conversion C-level slot and method: ``nb_nonzero`` is "
1414
1422
"now ``nb_bool``."
1415
- msgstr ""
1423
+ msgstr "重命名布尔转换的 C 层级槽位和方法: ``nb_nonzero`` 现在改为 ``nb_bool``。 "
1416
1424
1417
1425
#: ../../whatsnew/3.0.rst:878
1418
1426
msgid ""
@@ -1430,6 +1438,8 @@ msgid ""
1430
1438
"biggest cause is the removal of special-casing for small integers. There's "
1431
1439
"room for improvement, but it will happen after 3.0 is released!"
1432
1440
msgstr ""
1441
+ "综合而言 3.0 的改变使得 Python 3.0 运行 pystone 基准测试的速度比 Python 2.5 慢了约 10%。 "
1442
+ "其中最大的原因可能是移除了针对小整数的特别场景的处理。 虽然存在改进空间,但这将在 3.0 发布之后再进行!"
1433
1443
1434
1444
#: ../../whatsnew/3.0.rst:896
1435
1445
msgid "Porting To Python 3.0"
@@ -1439,17 +1449,18 @@ msgstr "移植到 Python 3.0"
1439
1449
msgid ""
1440
1450
"For porting existing Python 2.5 or 2.6 source code to Python 3.0, the best "
1441
1451
"strategy is the following:"
1442
- msgstr ""
1452
+ msgstr "对于将现有 Python 2.5 或 2.6 源代码移植到 Python 3.0,最佳的策略如下: "
1443
1453
1444
1454
#: ../../whatsnew/3.0.rst:901
1445
1455
msgid "(Prerequisite:) Start with excellent test coverage."
1446
- msgstr ""
1456
+ msgstr "(必要前提:)启动良好的测试覆盖。 "
1447
1457
1448
1458
#: ../../whatsnew/3.0.rst:903
1449
1459
msgid ""
1450
1460
"Port to Python 2.6. This should be no more work than the average port from "
1451
1461
"Python 2.x to Python 2.(x+1). Make sure all your tests pass."
1452
1462
msgstr ""
1463
+ "移植到 Python 2.6。 这应该不会比从 Python 2.x 到 Python 2.(x+1) 的正常移植更麻烦。 请确保所有的测试均能通过。"
1453
1464
1454
1465
#: ../../whatsnew/3.0.rst:907
1455
1466
msgid ""
@@ -1458,6 +1469,8 @@ msgid ""
1458
1469
"Run your test suite again, and fix code that you get warnings about until "
1459
1470
"there are no warnings left, and all your tests still pass."
1460
1471
msgstr ""
1472
+ "(仍然使用 2.6:) 打开 :option:`!-3` 命令行开关。 这将启用针对将在 3.0 中被移除(或修改)的特性的警告。 "
1473
+ "再次运行你的测试套件,并修复你收到相关警告的代码直至不再有任何警告,并且所有的测试仍然能通过。"
1461
1474
1462
1475
#: ../../whatsnew/3.0.rst:913
1463
1476
msgid ""
@@ -1477,6 +1490,9 @@ msgid ""
1477
1490
"the source code and running the ``2to3`` translator again, rather than "
1478
1491
"editing the 3.0 version of the source code."
1479
1492
msgstr ""
1493
+ "不建议尝试编写可不加修改地同时运行于 Python 2.6 和 3.0 的源代码;你将不得不使用一种非常扭曲的代码风格,例如避免 ``print`` "
1494
+ "语句、元类和许多其他特性。 如果你正在维护需要同时支持 Python 2.6 和 Python 3.0 的库,最佳做法是将上述的步骤 3 "
1495
+ "修改为编辑源代码的 2.6 版本并再次运行 ``2to3`` 翻译器,而不是修改源代码的 3.0 版本。"
1480
1496
1481
1497
#: ../../whatsnew/3.0.rst:927
1482
1498
msgid ""
0 commit comments