@@ -411,6 +411,10 @@ msgid ""
411
411
"The mutable API is based on :class:`collections.MutableSequence "
412
412
"<collections.abc.MutableSequence>`."
413
413
msgstr ""
414
+ "与 :class:`str` 一样,:class:`bytes` 类型是不可变的。 还有一个单独的 *可变* 类型用于保存带缓冲的二进制数据,即 "
415
+ ":class:`bytearray`。 几乎所有接受 :class:`bytes` 的 API 也都接受 :class:`bytearray`。 "
416
+ "这个可变 API 是基于 :class:`collections.MutableSequence "
417
+ "<collections.abc.MutableSequence>`。"
414
418
415
419
#: ../../whatsnew/3.0.rst:274
416
420
msgid ""
@@ -433,6 +437,9 @@ msgid ""
433
437
" tool (see below) replaces every occurrence of :class:`!basestring` with "
434
438
":class:`str`."
435
439
msgstr ""
440
+ "内置的 :class:`!basestring` 抽象类型已被移除。 请改用 :class:`str`。 :class:`str` 和 "
441
+ ":class:`bytes` 类型在功能上没有足够的共通性因此不需要有共享的基类。 ``2to3`` 工具(见下文)会将所有 "
442
+ ":class:`!basestring` 都替换为 :class:`str`。"
436
443
437
444
#: ../../whatsnew/3.0.rst:287
438
445
msgid ""
@@ -587,14 +594,16 @@ msgstr ""
587
594
588
595
#: ../../whatsnew/3.0.rst:385
589
596
msgid "This sets *a* to ``0``, *b* to ``4``, and *rest* to ``[1, 2, 3]``."
590
- msgstr ""
597
+ msgstr "这会将 *a* 设为 ``0``,*b* 设为 ``4``,而将 *rest* 设为 ``[1, 2, 3]``。 "
591
598
592
599
#: ../../whatsnew/3.0.rst:387
593
600
msgid ""
594
601
"Dictionary comprehensions: ``{k: v for k, v in stuff}`` means the same thing"
595
602
" as ``dict(stuff)`` but is more flexible. (This is :pep:`274` vindicated. "
596
603
":-)"
597
604
msgstr ""
605
+ "新增字典推导式: ``{k: v for k, v in stuff}`` 的含义与 ``dict(stuff)`` 相同但是更为灵活。 "
606
+ "(对此特性的解释见 :pep:`274`。 :-)"
598
607
599
608
#: ../../whatsnew/3.0.rst:391
600
609
msgid ""
@@ -603,24 +612,26 @@ msgid ""
603
612
"``{x for x in stuff}`` means the same thing as ``set(stuff)`` but is more "
604
613
"flexible."
605
614
msgstr ""
615
+ "新增集合字面值,例如 ``{1, 2}``。 请注意 ``{}`` 是空字典;要用 ``set()`` 表示空集合。 集合推导式也受到支持;例如 "
616
+ "``{x for x in stuff}`` 的含义与 ``set(stuff)`` 相同但是更为灵活。"
606
617
607
618
#: ../../whatsnew/3.0.rst:396
608
619
msgid ""
609
620
"New octal literals, e.g. ``0o720`` (already in 2.6). The old octal literals"
610
621
" (``0720``) are gone."
611
- msgstr ""
622
+ msgstr "新增八进制字面值,例如 ``0o720`` (已存在于 2.6 中)。 旧的八进制字面值 (``0720``) 已不复存在。 "
612
623
613
624
#: ../../whatsnew/3.0.rst:399
614
625
msgid ""
615
626
"New binary literals, e.g. ``0b1010`` (already in 2.6), and there is a new "
616
627
"corresponding built-in function, :func:`bin`."
617
- msgstr ""
628
+ msgstr "新增二进制字面值,例如 ``0b1010`` (已存在于 2.6 中),还有对应的新增内置函数 :func:`bin`。 "
618
629
619
630
#: ../../whatsnew/3.0.rst:402
620
631
msgid ""
621
632
"Bytes literals are introduced with a leading ``b`` or ``B``, and there is a "
622
633
"new corresponding built-in function, :func:`bytes`."
623
- msgstr ""
634
+ msgstr "引入了带有 ``b`` 或 ``B`` 前缀的字节串字面值,还有对应的新增内置函数 :func:`bytes`。 "
624
635
625
636
#: ../../whatsnew/3.0.rst:406
626
637
msgid "Changed Syntax"
@@ -664,6 +675,9 @@ msgid ""
664
675
" __metaclass__ = M\n"
665
676
" ..."
666
677
msgstr ""
678
+ "class C:\n"
679
+ " __metaclass__ = M\n"
680
+ " ..."
667
681
668
682
#: ../../whatsnew/3.0.rst:426
669
683
msgid "you must now use::"
@@ -674,6 +688,8 @@ msgid ""
674
688
"class C(metaclass=M):\n"
675
689
" ..."
676
690
msgstr ""
691
+ "class C(metaclass=M):\n"
692
+ " ..."
677
693
678
694
#: ../../whatsnew/3.0.rst:431
679
695
msgid ""
0 commit comments