77# Menghua Xiao <[email protected] >, 201888# Pandaaaa906 <[email protected] >, 20199910+ # Freesand Leo <[email protected] >, 20191011#
1112#, fuzzy
1213msgid ""
@@ -15,7 +16,7 @@ msgstr ""
1516"Report-Msgid-Bugs-To : \n "
1617"POT-Creation-Date : 2019-09-01 14:24+0000\n "
1718"PO-Revision-Date : 2017-02-16 23:22+0000\n "
18- "Last-Translator : nick <2330458484@qq .com>, 2019\n "
19+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2019\n "
1920"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2021"MIME-Version : 1.0\n "
2122"Content-Type : text/plain; charset=UTF-8\n "
@@ -40,6 +41,9 @@ msgid ""
4041"be the case if objects such as files, sockets or classes are included, as "
4142"well as many other objects which are not representable as Python literals."
4243msgstr ""
44+ ":mod:`pprint` 模块提供了“美化打印”任意 Python 数据结构的功能,这种美化形式可用作对解释器的输入。 如果经格式化的结构包含非基本 "
45+ "Python 类型的对象,则其美化形式可能无法被加载。 包含文件、套接字或类对象,以及许多其他不能用 Python "
46+ "字面值来表示的对象都有可能导致这样的结果。"
4347
4448#: ../../library/pprint.rst:21
4549msgid ""
@@ -48,12 +52,12 @@ msgid ""
4852"Construct :class:`PrettyPrinter` objects explicitly if you need to adjust "
4953"the width constraint."
5054msgstr ""
55+ "格式化后的形式会在可能的情况下以单行来表示对象,并在无法在允许宽度内容纳对象的情况下将其分为多行。 如果你需要调整宽度限制则应显式地构造 "
56+ ":class:`PrettyPrinter` 对象。"
5157
5258#: ../../library/pprint.rst:26
5359msgid "Dictionaries are sorted by key before the display is computed."
54- msgstr ""
55- "Dictionaries are sorted by key before the display is computed.\n"
56- "字典在被计算前通过键值来排序。"
60+ msgstr "字典在计算其显示形式前会先根据键来排序。"
5761
5862#: ../../library/pprint.rst:28
5963msgid "The :mod:`pprint` module defines one class:"
@@ -80,27 +84,37 @@ msgid ""
8084"default), dictionaries will be formatted with their keys sorted, otherwise "
8185"they will display in insertion order."
8286msgstr ""
87+ "构造一个 :class:`PrettyPrinter` 实例。 此构造器接受几个关键字形参。 使用 *stream* "
88+ "关键字可设置输出流;流对象使用的唯一方法是文件协议的 :meth:`write` 方法。 如果未指定此关键字,则 "
89+ ":class:`PrettyPrinter` 会选择 ``sys.stdout``。 每个递归层次的缩进量由 *indent* 指定;默认值为一。 "
90+ "其他值可导致输出看起来有些怪异,,但可使得嵌套结构更易区分。 可被打印的层级数量由 *depth* "
91+ "控制;如果数据结构的层级被打印得过深,其所包含的下一层级会被替换为 ``...``。 在默认情况下,对被格式化对象的层级深度没有限制。 "
92+ "希望的输出宽度可使用 *width* 形参来限制;默认值为 80 个字符。 如果一个结构无法在限定宽度内被格式化,则将做到尽可能接近。 如果 "
93+ "*compact* 为假值(默认)则长序列的每一项将被格式化为单独的行。 如果 *compact* 为真值,则将在 *width* "
94+ "可容纳的的情况下把尽可能多的项放入每个输出行。 如果 *sort_dicts* 为真值(默认),字典将被格式化为按键排序,否则将按插入顺序显示。"
8395
8496#: ../../library/pprint.rst:57 ../../library/pprint.rst:97
8597#: ../../library/pprint.rst:125
8698msgid "Added the *compact* parameter."
87- msgstr "加入 *compact* 参数 。"
99+ msgstr "增加了 *compact* 形参 。"
88100
89101#: ../../library/pprint.rst:60 ../../library/pprint.rst:100
90102#: ../../library/pprint.rst:128
91103msgid "Added the *sort_dicts* parameter."
92- msgstr ""
104+ msgstr "增加了 *sort_dicts* 形参。 "
93105
94106#: ../../library/pprint.rst:88
95107msgid "The :mod:`pprint` module also provides several shortcut functions:"
96- msgstr ""
108+ msgstr ":mod:`pprint` 模块还提供了一些快捷函数: "
97109
98110#: ../../library/pprint.rst:93
99111msgid ""
100112"Return the formatted representation of *object* as a string. *indent*, "
101113"*width*, *depth*, *compact* and *sort_dicts* will be passed to the "
102114":class:`PrettyPrinter` constructor as formatting parameters."
103115msgstr ""
116+ "*object* 的格式化表示作为字符串返回。 *indent*, *width*, *depth*, *compact* 和 *sort_dicts*"
117+ " 将作为格式化形参被传入 :class:`PrettyPrinter` 构造器。"
104118
105119#: ../../library/pprint.rst:106
106120msgid ""
@@ -110,6 +124,8 @@ msgid ""
110124"*args* and *kwargs* will be passed to :func:`pprint` as formatting "
111125"parameters."
112126msgstr ""
127+ "打印 *object* 的格式化表示并附带一个换行符。 如果 *sort_dicts* 为假值(默认),字典将按键的插入顺序显示,否则将按字典键排序。 "
128+ "*args* 和 *kwargs* 将作为格式化形参被传给 :func:`pprint`。"
113129
114130#: ../../library/pprint.rst:118
115131msgid ""
@@ -121,17 +137,23 @@ msgid ""
121137"will be passed to the :class:`PrettyPrinter` constructor as formatting "
122138"parameters."
123139msgstr ""
140+ "在 *stream* 上打打印 *object* 的格式化表示,并附带一个换行符。 如果 *stream* 为 ``None``,则使用 "
141+ "``sys.stdout``。 这可以替代 :func:`print` 函数在交互式解释器中使用以查看值(你甚至可以执行重新赋值 ``print = "
142+ "pprint.pprint`` 以在特定作用域中使用)。 *indent*, *width*, *depth*, *compact* 和 "
143+ "*sort_dicts* 将作为格式化形参被传给 :class:`PrettyPrinter` 构造器。"
124144
125145#: ../../library/pprint.rst:147
126146msgid ""
127147"Determine if the formatted representation of *object* is \" readable,\" or "
128148"can be used to reconstruct the value using :func:`eval`. This always "
129149"returns ``False`` for recursive objects."
130150msgstr ""
151+ "确定 *object* 的格式化表示是否“可读”,或是否可被用来通过 :func:`eval` 重新构建对象的值。 此函数对于递归对象总是返回 "
152+ "``False``。"
131153
132154#: ../../library/pprint.rst:157
133155msgid "Determine if *object* requires a recursive representation."
134- msgstr ""
156+ msgstr "确定 *object* 是否需要递归表示。 "
135157
136158#: ../../library/pprint.rst:160
137159msgid "One more support function is also defined:"
0 commit comments