7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.12\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2024-05-09 00:03+0000\n "
10
+ "POT-Creation-Date : 2024-06-29 00:03+0000\n "
11
11
"PO-Revision-Date : 2018-05-23 16:08+0000\n "
12
12
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -59,61 +59,97 @@ msgstr ""
59
59
msgid "Functions"
60
60
msgstr ""
61
61
62
- #: ../../library/pprint.rst:40
62
+ #: ../../library/pprint.rst:41
63
63
msgid ""
64
- "Prints the formatted representation of *object* followed by a newline. If "
65
- "*sort_dicts* is false (the default), dictionaries will be displayed with "
66
- "their keys in insertion order, otherwise the dict keys will be sorted. "
67
- "*args* and *kwargs* will be passed to :func:`~pprint.pprint` as formatting "
68
- "parameters."
64
+ "Prints the formatted representation of *object*, followed by a newline. This "
65
+ "function may be used in the interactive interpreter instead of the :func:"
66
+ "`print` function for inspecting values. Tip: you can reassign ``print = "
67
+ "pprint.pp`` for use within a scope."
68
+ msgstr ""
69
+
70
+ #: ../../library/pprint.rst:0
71
+ msgid "Parameters"
72
+ msgstr ""
73
+
74
+ #: ../../library/pprint.rst:46
75
+ msgid "The object to be printed."
76
+ msgstr ""
77
+
78
+ #: ../../library/pprint.rst:49
79
+ msgid ""
80
+ "A file-like object to which the output will be written by calling its :meth:"
81
+ "`!write` method. If ``None`` (the default), :data:`sys.stdout` is used."
82
+ msgstr ""
83
+
84
+ #: ../../library/pprint.rst:55
85
+ msgid "The amount of indentation added for each nesting level."
86
+ msgstr ""
87
+
88
+ #: ../../library/pprint.rst:58
89
+ msgid ""
90
+ "The desired maximum number of characters per line in the output. If a "
91
+ "structure cannot be formatted within the width constraint, a best effort "
92
+ "will be made."
69
93
msgstr ""
70
94
71
95
#: ../../library/pprint.rst:63
72
96
msgid ""
73
- "Prints the formatted representation of *object* on *stream*, followed by a "
74
- "newline. If *stream* is ``None``, :data:`sys.stdout` is used. This may be "
75
- "used in the interactive interpreter instead of the :func:`print` function "
76
- "for inspecting values (you can even reassign ``print = pprint.pprint`` for "
77
- "use within a scope)."
97
+ "The number of nesting levels which may be printed. If the data structure "
98
+ "being printed is too deep, the next contained level is replaced by ``...``. "
99
+ "If ``None`` (the default), there is no constraint on the depth of the "
100
+ "objects being formatted."
78
101
msgstr ""
79
102
80
- #: ../../library/pprint.rst:69
103
+ #: ../../library/pprint.rst:71
81
104
msgid ""
82
- "The configuration parameters *stream*, *indent*, *width*, *depth*, "
83
- "*compact*, *sort_dicts* and *underscore_numbers* are passed to the :class: "
84
- "`PrettyPrinter` constructor and their meanings are as described in its "
85
- "documentation below ."
105
+ "Control the way long :term:`sequences <sequence>` are formatted. If "
106
+ "``False`` (the default), each item of a sequence will be formatted on a "
107
+ "separate line, otherwise as many items as will fit within the *width* will "
108
+ "be formatted on each output line ."
86
109
msgstr ""
87
110
88
- #: ../../library/pprint.rst:74
111
+ #: ../../library/pprint.rst:78
89
112
msgid ""
90
- "Note that *sort_dicts* is ``True`` by default and you might want to use : "
91
- "func:`~pprint.pp` instead where it is ``False`` by default."
113
+ "If ``True``, dictionaries will be formatted with their keys sorted, "
114
+ "otherwise they will be displayed in insertion order (the default) ."
92
115
msgstr ""
93
116
94
- #: ../../library/pprint.rst:80
117
+ #: ../../library/pprint.rst:83
118
+ msgid ""
119
+ "If ``True``, integers will be formatted with the ``_`` character for a "
120
+ "thousands separator, otherwise underscores are not displayed (the default)."
121
+ msgstr ""
122
+
123
+ #: ../../library/pprint.rst:105
124
+ msgid ""
125
+ "Alias for :func:`~pprint.pp` with *sort_dicts* set to ``True`` by default, "
126
+ "which would automatically sort the dictionaries' keys, you might want to "
127
+ "use :func:`~pprint.pp` instead where it is ``False`` by default."
128
+ msgstr ""
129
+
130
+ #: ../../library/pprint.rst:113
95
131
msgid ""
96
132
"Return the formatted representation of *object* as a string. *indent*, "
97
133
"*width*, *depth*, *compact*, *sort_dicts* and *underscore_numbers* are "
98
134
"passed to the :class:`PrettyPrinter` constructor as formatting parameters "
99
- "and their meanings are as described in its documentation below ."
135
+ "and their meanings are as described in the documentation above ."
100
136
msgstr ""
101
137
102
- #: ../../library/pprint.rst:90
138
+ #: ../../library/pprint.rst:123
103
139
msgid ""
104
140
"Determine if the formatted representation of *object* is \" readable\" , or "
105
141
"can be used to reconstruct the value using :func:`eval`. This always "
106
142
"returns ``False`` for recursive objects."
107
143
msgstr ""
108
144
109
- #: ../../library/pprint.rst:100
145
+ #: ../../library/pprint.rst:133
110
146
msgid ""
111
147
"Determine if *object* requires a recursive representation. This function is "
112
148
"subject to the same limitations as noted in :func:`saferepr` below and may "
113
149
"raise an :exc:`RecursionError` if it fails to detect a recursive object."
114
150
msgstr ""
115
151
116
- #: ../../library/pprint.rst:107
152
+ #: ../../library/pprint.rst:140
117
153
msgid ""
118
154
"Return a string representation of *object*, protected against recursion in "
119
155
"some common data structures, namely instances of :class:`dict`, :class:"
@@ -123,117 +159,61 @@ msgid ""
123
159
"id=number>``. The representation is not otherwise formatted."
124
160
msgstr ""
125
161
126
- #: ../../library/pprint.rst:120
162
+ #: ../../library/pprint.rst:153
127
163
msgid "PrettyPrinter Objects"
128
164
msgstr "PrettyPrinter 物件"
129
165
130
- #: ../../library/pprint.rst:122
131
- msgid "This module defines one class:"
166
+ #: ../../library/pprint.rst:160
167
+ msgid "Construct a : class:`PrettyPrinter` instance. "
132
168
msgstr ""
133
169
134
- #: ../../library/pprint.rst:132
135
- msgid ""
136
- "Construct a :class:`PrettyPrinter` instance. This constructor understands "
137
- "several keyword parameters."
138
- msgstr ""
139
-
140
- #: ../../library/pprint.rst:135
141
- msgid ""
142
- "*stream* (default :data:`!sys.stdout`) is a :term:`file-like object` to "
143
- "which the output will be written by calling its :meth:`!write` method. If "
144
- "both *stream* and :data:`!sys.stdout` are ``None``, then :meth:"
145
- "`~PrettyPrinter.pprint` silently returns."
146
- msgstr ""
147
-
148
- #: ../../library/pprint.rst:140
170
+ #: ../../library/pprint.rst:162
149
171
msgid ""
150
- "Other values configure the manner in which nesting of complex data "
151
- "structures is displayed ."
172
+ "Arguments have the same meaning as for :func:`~pprint.pp`. Note that they "
173
+ "are in a different order, and that *sort_dicts* defaults to ``True`` ."
152
174
msgstr ""
153
175
154
- #: ../../library/pprint.rst:143
155
- msgid ""
156
- "*indent* (default 1) specifies the amount of indentation added for each "
157
- "nesting level."
158
- msgstr ""
159
-
160
- #: ../../library/pprint.rst:146
161
- msgid ""
162
- "*depth* controls the number of nesting levels which may be printed; if the "
163
- "data structure being printed is too deep, the next contained level is "
164
- "replaced by ``...``. By default, there is no constraint on the depth of the "
165
- "objects being formatted."
166
- msgstr ""
167
-
168
- #: ../../library/pprint.rst:151
169
- msgid ""
170
- "*width* (default 80) specifies the desired maximum number of characters per "
171
- "line in the output. If a structure cannot be formatted within the width "
172
- "constraint, a best effort will be made."
173
- msgstr ""
174
-
175
- #: ../../library/pprint.rst:155
176
- msgid ""
177
- "*compact* impacts the way that long sequences (lists, tuples, sets, etc) are "
178
- "formatted. If *compact* is false (the default) then each item of a sequence "
179
- "will be formatted on a separate line. If *compact* is true, as many items "
180
- "as will fit within the *width* will be formatted on each output line."
181
- msgstr ""
182
-
183
- #: ../../library/pprint.rst:161
184
- msgid ""
185
- "If *sort_dicts* is true (the default), dictionaries will be formatted with "
186
- "their keys sorted, otherwise they will display in insertion order."
187
- msgstr ""
188
-
189
- #: ../../library/pprint.rst:164
190
- msgid ""
191
- "If *underscore_numbers* is true, integers will be formatted with the ``_`` "
192
- "character for a thousands separator, otherwise underscores are not displayed "
193
- "(the default)."
194
- msgstr ""
195
-
196
- #: ../../library/pprint.rst:168
176
+ #: ../../library/pprint.rst:189
197
177
msgid "Added the *compact* parameter."
198
178
msgstr "新增 *compact* 參數。"
199
179
200
- #: ../../library/pprint.rst:171
180
+ #: ../../library/pprint.rst:192
201
181
msgid "Added the *sort_dicts* parameter."
202
182
msgstr "新增 *sort_dicts* 參數。"
203
183
204
- #: ../../library/pprint.rst:174
184
+ #: ../../library/pprint.rst:195
205
185
msgid "Added the *underscore_numbers* parameter."
206
186
msgstr "新增 *underscore_numbers* 參數。"
207
187
208
- #: ../../library/pprint.rst:177
188
+ #: ../../library/pprint.rst:198
209
189
msgid "No longer attempts to write to :data:`!sys.stdout` if it is ``None``."
210
190
msgstr ""
211
191
212
- #: ../../library/pprint.rst:204
192
+ #: ../../library/pprint.rst:202
213
193
msgid ":class:`PrettyPrinter` instances have the following methods:"
214
194
msgstr ""
215
195
216
- #: ../../library/pprint.rst:209
196
+ #: ../../library/pprint.rst:207
217
197
msgid ""
218
198
"Return the formatted representation of *object*. This takes into account "
219
199
"the options passed to the :class:`PrettyPrinter` constructor."
220
200
msgstr ""
221
201
222
- #: ../../library/pprint.rst:215
202
+ #: ../../library/pprint.rst:213
223
203
msgid ""
224
204
"Print the formatted representation of *object* on the configured stream, "
225
205
"followed by a newline."
226
206
msgstr ""
227
207
228
- #: ../../library/pprint.rst:218
208
+ #: ../../library/pprint.rst:216
229
209
msgid ""
230
210
"The following methods provide the implementations for the corresponding "
231
211
"functions of the same names. Using these methods on an instance is slightly "
232
212
"more efficient since new :class:`PrettyPrinter` objects don't need to be "
233
213
"created."
234
214
msgstr ""
235
215
236
- #: ../../library/pprint.rst:228
216
+ #: ../../library/pprint.rst:226
237
217
msgid ""
238
218
"Determine if the formatted representation of the object is \" readable,\" or "
239
219
"can be used to reconstruct the value using :func:`eval`. Note that this "
@@ -242,18 +222,18 @@ msgid ""
242
222
"returns ``False``."
243
223
msgstr ""
244
224
245
- #: ../../library/pprint.rst:237
225
+ #: ../../library/pprint.rst:235
246
226
msgid "Determine if the object requires a recursive representation."
247
227
msgstr ""
248
228
249
- #: ../../library/pprint.rst:239
229
+ #: ../../library/pprint.rst:237
250
230
msgid ""
251
231
"This method is provided as a hook to allow subclasses to modify the way "
252
232
"objects are converted to strings. The default implementation uses the "
253
233
"internals of the :func:`saferepr` implementation."
254
234
msgstr ""
255
235
256
- #: ../../library/pprint.rst:246
236
+ #: ../../library/pprint.rst:244
257
237
msgid ""
258
238
"Returns three values: the formatted version of *object* as a string, a flag "
259
239
"indicating whether the result is readable, and a flag indicating whether "
@@ -271,45 +251,45 @@ msgid ""
271
251
"of the current call."
272
252
msgstr ""
273
253
274
- #: ../../library/pprint.rst:264
254
+ #: ../../library/pprint.rst:262
275
255
msgid "Example"
276
256
msgstr "範例"
277
257
278
- #: ../../library/pprint.rst:266
258
+ #: ../../library/pprint.rst:264
279
259
msgid ""
280
260
"To demonstrate several uses of the :func:`~pprint.pp` function and its "
281
261
"parameters, let's fetch information about a project from `PyPI <https://pypi."
282
262
"org>`_::"
283
263
msgstr ""
284
264
285
- #: ../../library/pprint.rst:275
265
+ #: ../../library/pprint.rst:273
286
266
msgid "In its basic form, :func:`~pprint.pp` shows the whole object::"
287
267
msgstr ""
288
268
289
- #: ../../library/pprint.rst:331
269
+ #: ../../library/pprint.rst:329
290
270
msgid ""
291
271
"The result can be limited to a certain *depth* (ellipsis is used for deeper "
292
272
"contents)::"
293
273
msgstr ""
294
274
295
- #: ../../library/pprint.rst:377
275
+ #: ../../library/pprint.rst:375
296
276
msgid ""
297
277
"Additionally, maximum character *width* can be suggested. If a long object "
298
278
"cannot be split, the specified width will be exceeded::"
299
279
msgstr ""
300
280
301
- #: ../../library/pprint.rst:88 ../../library/pprint.rst:226
281
+ #: ../../library/pprint.rst:121 ../../library/pprint.rst:224
302
282
msgid "built-in function"
303
283
msgstr "built-in function(內建函式)"
304
284
305
- #: ../../library/pprint.rst:88 ../../library/pprint.rst:226
285
+ #: ../../library/pprint.rst:121 ../../library/pprint.rst:224
306
286
msgid "eval"
307
287
msgstr "eval"
308
288
309
- #: ../../library/pprint.rst:127
289
+ #: ../../library/pprint.rst:155
310
290
msgid "..."
311
291
msgstr "..."
312
292
313
- #: ../../library/pprint.rst:127
293
+ #: ../../library/pprint.rst:155
314
294
msgid "placeholder"
315
295
msgstr "placeholder(佔位符號)"
0 commit comments