@@ -406,6 +406,13 @@ msgid ""
406
406
"have a way to override the encoding. There is no longer any need for using "
407
407
"the encoding-aware streams in the :mod:`codecs` module."
408
408
msgstr ""
409
+ "作为文本文件打开的文件(仍然是 :func:`open` 的默认模式)总是会使用一个编码格式在(内存中的)字符串和(磁盘中的)字节串之间建立映射。 "
410
+ "二进制文件(将 mode 参数设为 ``b`` 来打开)在内存中总是会使用数字串。 这意味着如果一个文件是使用不正确的模式或编码格式打开的,I/O "
411
+ "操作很可能会报告失败,而不是静默地产生不正确的数据。 这也意味着即使是 Unix 用户在打开文件时也必须指定正确的模式(文本或二进制)。 "
412
+ "存在一个依赖于具体平台的默认编码格式,在类 Unix 平台上可以通过 ``LANG`` "
413
+ "环境变量来设置(有时也会使用其他一些平台专属的语言区域相关的环境变量)。 在多数情况下,系统默认使用 "
414
+ "UTF-8,但并非全都如此;你绝不应该依赖这个默认值。 任何读写超出纯 ASCII 文本范围的内容的应用程序都应该提供重写编码格式的选项。 "
415
+ "现在已不再需要使用 :mod:`codecs` 模块中可感知编码格式的流。"
409
416
410
417
#: ../../whatsnew/3.0.rst:304
411
418
msgid ""
@@ -536,14 +543,16 @@ msgstr ""
536
543
537
544
#: ../../whatsnew/3.0.rst:385
538
545
msgid "This sets *a* to ``0``, *b* to ``4``, and *rest* to ``[1, 2, 3]``."
539
- msgstr ""
546
+ msgstr "这会将 *a* 设为 ``0``,*b* 设为 ``4``,而将 *rest* 设为 ``[1, 2, 3]``。 "
540
547
541
548
#: ../../whatsnew/3.0.rst:387
542
549
msgid ""
543
550
"Dictionary comprehensions: ``{k: v for k, v in stuff}`` means the same thing"
544
551
" as ``dict(stuff)`` but is more flexible. (This is :pep:`274` vindicated. "
545
552
":-)"
546
553
msgstr ""
554
+ "新增字典推导式: ``{k: v for k, v in stuff}`` 的含义与 ``dict(stuff)`` 相同但是更为灵活。 "
555
+ "(对此特性的解释见 :pep:`274`。 :-)"
547
556
548
557
#: ../../whatsnew/3.0.rst:391
549
558
msgid ""
@@ -552,24 +561,26 @@ msgid ""
552
561
"``{x for x in stuff}`` means the same thing as ``set(stuff)`` but is more "
553
562
"flexible."
554
563
msgstr ""
564
+ "新增集合字面值,例如 ``{1, 2}``。 请注意 ``{}`` 是空字典;要用 ``set()`` 表示空集合。 集合推导式也受到支持;例如 "
565
+ "``{x for x in stuff}`` 的含义与 ``set(stuff)`` 相同但是更为灵活。"
555
566
556
567
#: ../../whatsnew/3.0.rst:396
557
568
msgid ""
558
569
"New octal literals, e.g. ``0o720`` (already in 2.6). The old octal literals"
559
570
" (``0720``) are gone."
560
- msgstr ""
571
+ msgstr "新增八进制字面值,例如 ``0o720`` (已存在于 2.6 中)。 旧的八进制字面值 (``0720``) 已不复存在。 "
561
572
562
573
#: ../../whatsnew/3.0.rst:399
563
574
msgid ""
564
575
"New binary literals, e.g. ``0b1010`` (already in 2.6), and there is a new "
565
576
"corresponding built-in function, :func:`bin`."
566
- msgstr ""
577
+ msgstr "新增二进制字面值,例如 ``0b1010`` (已存在于 2.6 中),还有对应的新增内置函数 :func:`bin`。 "
567
578
568
579
#: ../../whatsnew/3.0.rst:402
569
580
msgid ""
570
581
"Bytes literals are introduced with a leading ``b`` or ``B``, and there is a "
571
582
"new corresponding built-in function, :func:`bytes`."
572
- msgstr ""
583
+ msgstr "引入了带有 ``b`` 或 ``B`` 前缀的字节串字面值,还有对应的新增内置函数 :func:`bytes`。 "
573
584
574
585
#: ../../whatsnew/3.0.rst:406
575
586
msgid "Changed Syntax"
@@ -649,14 +660,16 @@ msgid ""
649
660
":pep:`3113`: Tuple parameter unpacking removed. You can no longer write "
650
661
"``def foo(a, (b, c)): ...``. Use ``def foo(a, b_c): b, c = b_c`` instead."
651
662
msgstr ""
663
+ ":pep:`3113`: 元组形参解包已被移除。 你不能再使用 ``def foo(a, (b, c)): ...`` 的写法。 请改用 ``def "
664
+ "foo(a, b_c): b, c = b_c``。"
652
665
653
666
#: ../../whatsnew/3.0.rst:456
654
667
msgid "Removed backticks (use :func:`repr` instead)."
655
- msgstr ""
668
+ msgstr "移除了反引号(请使用 :func:`repr` 代替)。 "
656
669
657
670
#: ../../whatsnew/3.0.rst:458
658
671
msgid "Removed ``<>`` (use ``!=`` instead)."
659
- msgstr ""
672
+ msgstr "移除了 ``<>`` (请改用 ``!=``)。 "
660
673
661
674
#: ../../whatsnew/3.0.rst:460
662
675
msgid ""