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