@@ -1433,7 +1433,7 @@ msgstr ":meth:`!__nonzero__` 现在为 :meth:`~object.__bool__`。"
1433
1433
1434
1434
#: ../../whatsnew/3.0.rst:797
1435
1435
msgid "Builtins"
1436
- msgstr ""
1436
+ msgstr "内置对象 "
1437
1437
1438
1438
#: ../../whatsnew/3.0.rst:799
1439
1439
msgid ""
@@ -1443,6 +1443,8 @@ msgid ""
1443
1443
"automatically be chosen. With arguments, the behavior of :func:`super` is "
1444
1444
"unchanged."
1445
1445
msgstr ""
1446
+ ":pep:`3135`: 新的 :func:`super`。 现在你可以不带参数地唤起 :func:`super` 这样(假定这发生在定义于 "
1447
+ ":keyword:`class` 语句内部的常规实例方法中)将会自动选择正确的类和实例。 附带参数时,:func:`super` 的行为保持不变。"
1446
1448
1447
1449
#: ../../whatsnew/3.0.rst:805
1448
1450
msgid ""
@@ -1452,12 +1454,15 @@ msgid ""
1452
1454
"input is terminated prematurely. To get the old behavior of :func:`input`, "
1453
1455
"use ``eval(input())``."
1454
1456
msgstr ""
1457
+ ":pep:`3111`: :func:`!raw_input` 已改名为 :func:`input`。 也就是说,新的 :func:`input` "
1458
+ "函数会从 :data:`sys.stdin` 读取一行并去除末尾换行符再将其返回。 如果输入提前终结则会引发 :exc:`EOFError`。 "
1459
+ "要获取原来 :func:`input` 的行为,请使用 ``eval(input())``。"
1455
1460
1456
1461
#: ../../whatsnew/3.0.rst:811
1457
1462
msgid ""
1458
1463
"A new built-in function :func:`next` was added to call the "
1459
1464
":meth:`~iterator.__next__` method on an object."
1460
- msgstr ""
1465
+ msgstr "新增内置函数 :func:`next` 用于在对象上调用 :meth:`~iterator.__next__` 方法。 "
1461
1466
1462
1467
#: ../../whatsnew/3.0.rst:814
1463
1468
msgid ""
@@ -1469,56 +1474,67 @@ msgid ""
1469
1474
"a single argument and a value of the same type as ``x`` when called with two"
1470
1475
" arguments."
1471
1476
msgstr ""
1477
+ ":func:`round` 函数的舍入策略和返回类型已有改变。 对于两边差值相同的情况现在将会舍入到最接近的偶数结果而不是远离零值的结果。 "
1478
+ "(例如,``round(2.5)`` 现在将返回 ``2`` 而不是 ``3``。) 现在 ``round(x[, n])`` 将委托给 "
1479
+ "``x.__round__([n])`` 而不是始终返回一个浮点数。 它通常会在附带一个参数调用时返回整数而在附带两个参数调用时返回与 ``x`` "
1480
+ "相同类型的值。"
1472
1481
1473
1482
#: ../../whatsnew/3.0.rst:823
1474
1483
msgid "Moved :func:`!intern` to :func:`sys.intern`."
1475
- msgstr ""
1484
+ msgstr "将 :func:`!intern` 移至 :func:`sys.intern`。 "
1476
1485
1477
1486
#: ../../whatsnew/3.0.rst:825
1478
1487
msgid ""
1479
1488
"Removed: :func:`!apply`. Instead of ``apply(f, args)`` use ``f(*args)``."
1480
- msgstr ""
1489
+ msgstr "移除: :func:`!apply`。 原 ``apply(f, args)`` 请改用 ``f(*args)``。 "
1481
1490
1482
1491
#: ../../whatsnew/3.0.rst:828
1483
1492
msgid ""
1484
1493
"Removed :func:`callable`. Instead of ``callable(f)`` you can use "
1485
1494
"``isinstance(f, collections.Callable)``. The :func:`!operator.isCallable` "
1486
1495
"function is also gone."
1487
1496
msgstr ""
1497
+ "移除了 :func:`callable`。 原 ``callable(f)`` 可以改用 ``isinstance(f, "
1498
+ "collections.Callable)``。 :func:`!operator.isCallable` 函数也已不复存在。"
1488
1499
1489
1500
#: ../../whatsnew/3.0.rst:832
1490
1501
msgid ""
1491
1502
"Removed :func:`!coerce`. This function no longer serves a purpose now that "
1492
1503
"classic classes are gone."
1493
- msgstr ""
1504
+ msgstr "移除了 :func:`!coerce`。 由于经典类已不复存在此函数也不再有用处。 "
1494
1505
1495
1506
#: ../../whatsnew/3.0.rst:835
1496
1507
msgid ""
1497
1508
"Removed :func:`!execfile`. Instead of ``execfile(fn)`` use "
1498
1509
"``exec(open(fn).read())``."
1499
1510
msgstr ""
1511
+ "移除了 :func:`!execfile`。 原 ``execfile(fn)`` 请改用 ``exec(open(fn).read())``。"
1500
1512
1501
1513
#: ../../whatsnew/3.0.rst:838
1502
1514
msgid ""
1503
1515
"Removed the :class:`!file` type. Use :func:`open`. There are now several "
1504
1516
"different kinds of streams that open can return in the :mod:`io` module."
1505
1517
msgstr ""
1518
+ "移除了 :class:`!file` 类型。 请使用 :func:`open`。 当前在 :mod:`io` 模块中有多种不同类别的流可由 open "
1519
+ "函数返回。"
1506
1520
1507
1521
#: ../../whatsnew/3.0.rst:841
1508
1522
msgid ""
1509
1523
"Removed :func:`!reduce`. Use :func:`functools.reduce` if you really need "
1510
1524
"it; however, 99 percent of the time an explicit :keyword:`for` loop is more "
1511
1525
"readable."
1512
1526
msgstr ""
1527
+ "移除了 :func:`!reduce`。 如果你确实需要它可使用 :func:`functools.reduce`;不过,在百分之 99 "
1528
+ "的情况下用显式的 :keyword:`for` 循环会有更好的可读性。"
1513
1529
1514
1530
#: ../../whatsnew/3.0.rst:845
1515
1531
msgid "Removed :func:`!reload`. Use :func:`!imp.reload`."
1516
- msgstr ""
1532
+ msgstr "移除了 :func:`!reload`。 请使用 :func:`!imp.reload`。 "
1517
1533
1518
1534
#: ../../whatsnew/3.0.rst:847
1519
1535
msgid ""
1520
1536
"Removed. :meth:`!dict.has_key` -- use the :keyword:`in` operator instead."
1521
- msgstr ""
1537
+ msgstr "移除了 :meth:`!dict.has_key` -- 请改用 :keyword:`in` 运算符。 "
1522
1538
1523
1539
#: ../../whatsnew/3.0.rst:854
1524
1540
msgid "Build and C API Changes"
@@ -1528,48 +1544,52 @@ msgstr "构建和 C API 的改变"
1528
1544
msgid ""
1529
1545
"Due to time constraints, here is a *very* incomplete list of changes to the "
1530
1546
"C API."
1531
- msgstr ""
1547
+ msgstr "由于时间约束,下面 C API 的变化列表 *非常* 不完整。 "
1532
1548
1533
1549
#: ../../whatsnew/3.0.rst:859
1534
1550
msgid ""
1535
1551
"Support for several platforms was dropped, including but not limited to Mac "
1536
1552
"OS 9, BeOS, RISCOS, Irix, and Tru64."
1537
- msgstr ""
1553
+ msgstr "已放弃对某些平台的支持,包括但不限于 Mac OS 9, BeOS, RISCOS, Irix 和 Tru64。 "
1538
1554
1539
1555
#: ../../whatsnew/3.0.rst:862
1540
1556
msgid ":pep:`3118`: New Buffer API."
1541
1557
msgstr ":pep:`3118`: 新的缓冲区 API。"
1542
1558
1543
1559
#: ../../whatsnew/3.0.rst:864
1544
1560
msgid ":pep:`3121`: Extension Module Initialization & Finalization."
1545
- msgstr ""
1561
+ msgstr ":pep:`3121`: 扩展模块初始化与最终化。 "
1546
1562
1547
1563
#: ../../whatsnew/3.0.rst:866
1548
1564
msgid ":pep:`3123`: Making :c:macro:`PyObject_HEAD` conform to standard C."
1549
- msgstr ""
1565
+ msgstr ":pep:`3123`: 使 :c:macro:`PyObject_HEAD` 与标准 C 一致。 "
1550
1566
1551
1567
#: ../../whatsnew/3.0.rst:868
1552
1568
msgid "No more C API support for restricted execution."
1553
- msgstr ""
1569
+ msgstr "已去除对受限执行的 C API 支持。 "
1554
1570
1555
1571
#: ../../whatsnew/3.0.rst:870
1556
1572
msgid ""
1557
1573
":c:func:`!PyNumber_Coerce`, :c:func:`!PyNumber_CoerceEx`, "
1558
1574
":c:func:`!PyMember_Get`, and :c:func:`!PyMember_Set` C APIs are removed."
1559
1575
msgstr ""
1576
+ ":c:func:`!PyNumber_Coerce`, :c:func:`!PyNumber_CoerceEx`, "
1577
+ ":c:func:`!PyMember_Get` 和 :c:func:`!PyMember_Set` C API 已被移除。"
1560
1578
1561
1579
#: ../../whatsnew/3.0.rst:873
1562
1580
msgid ""
1563
1581
"New C API :c:func:`PyImport_ImportModuleNoBlock`, works like "
1564
1582
":c:func:`PyImport_ImportModule` but won't block on the import lock "
1565
1583
"(returning an error instead)."
1566
1584
msgstr ""
1585
+ "新的 C API :c:func:`PyImport_ImportModuleNoBlock`,类似于 "
1586
+ ":c:func:`PyImport_ImportModule` 但不会因导入锁而阻塞(改为返回错误)。"
1567
1587
1568
1588
#: ../../whatsnew/3.0.rst:877
1569
1589
msgid ""
1570
1590
"Renamed the boolean conversion C-level slot and method: ``nb_nonzero`` is "
1571
1591
"now ``nb_bool``."
1572
- msgstr ""
1592
+ msgstr "重命名布尔转换的 C 层级槽位和方法: ``nb_nonzero`` 现在改为 ``nb_bool``。 "
1573
1593
1574
1594
#: ../../whatsnew/3.0.rst:880
1575
1595
msgid ""