@@ -535,6 +535,8 @@ msgid ""
535535"compatibility with earlier versions of Python, use :mod:`argparse` instead "
536536"of :mod:`optparse`."
537537msgstr ""
538+ "简而言之,如果你是在编写新脚本并且不需要担心与 Python 较早版本的兼容性,请使用 :mod:`argparse` 而不是 "
539+ ":mod:`optparse`。"
538540
539541#: ../../whatsnew/2.7.rst:370
540542msgid "Here's an example::"
@@ -544,13 +546,13 @@ msgstr "以下是为示例代码::"
544546msgid ""
545547"Unless you override it, :option:`!-h` and :option:`!--help` switches are "
546548"automatically added, and produce neatly formatted output::"
547- msgstr ""
549+ msgstr "除非你覆盖它,否则会自动添加 :option:`!-h` 和 :option:`!--help` 开关,并产生格式化良好的输出:: "
548550
549551#: ../../whatsnew/2.7.rst:410
550552msgid ""
551553"As with :mod:`optparse`, the command-line switches and arguments are "
552554"returned as an object with attributes named by the *dest* parameters::"
553- msgstr ""
555+ msgstr "与 :mod:`optparse` 一样,命令行开关和参数将返回为一个具有通过 *dest* 形参所指定的属性的对象:: "
554556
555557#: ../../whatsnew/2.7.rst:425
556558msgid ""
@@ -679,6 +681,8 @@ msgid ""
679681":meth:`~dict.items` are different in Python 3.x. They return an object "
680682"called a :dfn:`view` instead of a fully materialized list."
681683msgstr ""
684+ "字典方法 :meth:`~dict.keys`, :meth:`~dict.values`, and :meth:`~dict.items` 在 "
685+ "Python 3.x 有所不同。 它们将返回名为 :dfn:`view` 的对象而不是完整的列表。"
682686
683687#: ../../whatsnew/2.7.rst:554
684688msgid ""
@@ -687,25 +691,28 @@ msgid ""
687691" code would break. Instead the 3.x versions were added under the new names "
688692":meth:`!viewkeys`, :meth:`!viewvalues`, and :meth:`!viewitems`."
689693msgstr ""
694+ "在 Python 2.7 中不可能改变 :meth:`~dict.keys`, :meth:`~dict.values` 和 "
695+ ":meth:`~dict.items` 的返回值因为那会破坏大量已有代码。 作为替代 3.x 版本是以新名称 :meth:`!viewkeys`, "
696+ ":meth:`!viewvalues` 和 :meth:`!viewitems` 添加的。"
690697
691698#: ../../whatsnew/2.7.rst:568
692699msgid ""
693700"Views can be iterated over, but the key and item views also behave like "
694701"sets. The ``&`` operator performs intersection, and ``|`` performs a "
695702"union::"
696- msgstr ""
703+ msgstr "视图可以被迭代,但键和条目视图的行为也很像是集合。 ``&`` 运算符执行交集运算,``|`` 执行并集运算:: "
697704
698705#: ../../whatsnew/2.7.rst:579
699706msgid ""
700707"The view keeps track of the dictionary and its contents change as the "
701708"dictionary is modified::"
702- msgstr ""
709+ msgstr "视图会追踪字典及字典被修改时的内容变化:: "
703710
704711#: ../../whatsnew/2.7.rst:589
705712msgid ""
706713"However, note that you can't add or remove keys while you're iterating over "
707714"the view::"
708- msgstr ""
715+ msgstr "但是,请注意在对视图进行迭代时你是不能添加或移除键的:: "
709716
710717#: ../../whatsnew/2.7.rst:599
711718msgid ""
0 commit comments