Skip to content

Commit 680cf2a

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython 5c06b346
1 parent 2d75999 commit 680cf2a

File tree

1 file changed

+88
-108
lines changed

1 file changed

+88
-108
lines changed

library/pprint.po

+88-108
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"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"
1111
"PO-Revision-Date: 2018-05-23 16:08+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -59,61 +59,97 @@ msgstr ""
5959
msgid "Functions"
6060
msgstr ""
6161

62-
#: ../../library/pprint.rst:40
62+
#: ../../library/pprint.rst:41
6363
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."
6993
msgstr ""
7094

7195
#: ../../library/pprint.rst:63
7296
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."
78101
msgstr ""
79102

80-
#: ../../library/pprint.rst:69
103+
#: ../../library/pprint.rst:71
81104
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."
86109
msgstr ""
87110

88-
#: ../../library/pprint.rst:74
111+
#: ../../library/pprint.rst:78
89112
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)."
92115
msgstr ""
93116

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
95131
msgid ""
96132
"Return the formatted representation of *object* as a string. *indent*, "
97133
"*width*, *depth*, *compact*, *sort_dicts* and *underscore_numbers* are "
98134
"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."
100136
msgstr ""
101137

102-
#: ../../library/pprint.rst:90
138+
#: ../../library/pprint.rst:123
103139
msgid ""
104140
"Determine if the formatted representation of *object* is \"readable\", or "
105141
"can be used to reconstruct the value using :func:`eval`. This always "
106142
"returns ``False`` for recursive objects."
107143
msgstr ""
108144

109-
#: ../../library/pprint.rst:100
145+
#: ../../library/pprint.rst:133
110146
msgid ""
111147
"Determine if *object* requires a recursive representation. This function is "
112148
"subject to the same limitations as noted in :func:`saferepr` below and may "
113149
"raise an :exc:`RecursionError` if it fails to detect a recursive object."
114150
msgstr ""
115151

116-
#: ../../library/pprint.rst:107
152+
#: ../../library/pprint.rst:140
117153
msgid ""
118154
"Return a string representation of *object*, protected against recursion in "
119155
"some common data structures, namely instances of :class:`dict`, :class:"
@@ -123,117 +159,61 @@ msgid ""
123159
"id=number>``. The representation is not otherwise formatted."
124160
msgstr ""
125161

126-
#: ../../library/pprint.rst:120
162+
#: ../../library/pprint.rst:153
127163
msgid "PrettyPrinter Objects"
128164
msgstr "PrettyPrinter 物件"
129165

130-
#: ../../library/pprint.rst:122
131-
msgid "This module defines one class:"
166+
#: ../../library/pprint.rst:160
167+
msgid "Construct a :class:`PrettyPrinter` instance."
132168
msgstr ""
133169

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
149171
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``."
152174
msgstr ""
153175

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
197177
msgid "Added the *compact* parameter."
198178
msgstr "新增 *compact* 參數。"
199179

200-
#: ../../library/pprint.rst:171
180+
#: ../../library/pprint.rst:192
201181
msgid "Added the *sort_dicts* parameter."
202182
msgstr "新增 *sort_dicts* 參數。"
203183

204-
#: ../../library/pprint.rst:174
184+
#: ../../library/pprint.rst:195
205185
msgid "Added the *underscore_numbers* parameter."
206186
msgstr "新增 *underscore_numbers* 參數。"
207187

208-
#: ../../library/pprint.rst:177
188+
#: ../../library/pprint.rst:198
209189
msgid "No longer attempts to write to :data:`!sys.stdout` if it is ``None``."
210190
msgstr ""
211191

212-
#: ../../library/pprint.rst:204
192+
#: ../../library/pprint.rst:202
213193
msgid ":class:`PrettyPrinter` instances have the following methods:"
214194
msgstr ""
215195

216-
#: ../../library/pprint.rst:209
196+
#: ../../library/pprint.rst:207
217197
msgid ""
218198
"Return the formatted representation of *object*. This takes into account "
219199
"the options passed to the :class:`PrettyPrinter` constructor."
220200
msgstr ""
221201

222-
#: ../../library/pprint.rst:215
202+
#: ../../library/pprint.rst:213
223203
msgid ""
224204
"Print the formatted representation of *object* on the configured stream, "
225205
"followed by a newline."
226206
msgstr ""
227207

228-
#: ../../library/pprint.rst:218
208+
#: ../../library/pprint.rst:216
229209
msgid ""
230210
"The following methods provide the implementations for the corresponding "
231211
"functions of the same names. Using these methods on an instance is slightly "
232212
"more efficient since new :class:`PrettyPrinter` objects don't need to be "
233213
"created."
234214
msgstr ""
235215

236-
#: ../../library/pprint.rst:228
216+
#: ../../library/pprint.rst:226
237217
msgid ""
238218
"Determine if the formatted representation of the object is \"readable,\" or "
239219
"can be used to reconstruct the value using :func:`eval`. Note that this "
@@ -242,18 +222,18 @@ msgid ""
242222
"returns ``False``."
243223
msgstr ""
244224

245-
#: ../../library/pprint.rst:237
225+
#: ../../library/pprint.rst:235
246226
msgid "Determine if the object requires a recursive representation."
247227
msgstr ""
248228

249-
#: ../../library/pprint.rst:239
229+
#: ../../library/pprint.rst:237
250230
msgid ""
251231
"This method is provided as a hook to allow subclasses to modify the way "
252232
"objects are converted to strings. The default implementation uses the "
253233
"internals of the :func:`saferepr` implementation."
254234
msgstr ""
255235

256-
#: ../../library/pprint.rst:246
236+
#: ../../library/pprint.rst:244
257237
msgid ""
258238
"Returns three values: the formatted version of *object* as a string, a flag "
259239
"indicating whether the result is readable, and a flag indicating whether "
@@ -271,45 +251,45 @@ msgid ""
271251
"of the current call."
272252
msgstr ""
273253

274-
#: ../../library/pprint.rst:264
254+
#: ../../library/pprint.rst:262
275255
msgid "Example"
276256
msgstr "範例"
277257

278-
#: ../../library/pprint.rst:266
258+
#: ../../library/pprint.rst:264
279259
msgid ""
280260
"To demonstrate several uses of the :func:`~pprint.pp` function and its "
281261
"parameters, let's fetch information about a project from `PyPI <https://pypi."
282262
"org>`_::"
283263
msgstr ""
284264

285-
#: ../../library/pprint.rst:275
265+
#: ../../library/pprint.rst:273
286266
msgid "In its basic form, :func:`~pprint.pp` shows the whole object::"
287267
msgstr ""
288268

289-
#: ../../library/pprint.rst:331
269+
#: ../../library/pprint.rst:329
290270
msgid ""
291271
"The result can be limited to a certain *depth* (ellipsis is used for deeper "
292272
"contents)::"
293273
msgstr ""
294274

295-
#: ../../library/pprint.rst:377
275+
#: ../../library/pprint.rst:375
296276
msgid ""
297277
"Additionally, maximum character *width* can be suggested. If a long object "
298278
"cannot be split, the specified width will be exceeded::"
299279
msgstr ""
300280

301-
#: ../../library/pprint.rst:88 ../../library/pprint.rst:226
281+
#: ../../library/pprint.rst:121 ../../library/pprint.rst:224
302282
msgid "built-in function"
303283
msgstr "built-in function(內建函式)"
304284

305-
#: ../../library/pprint.rst:88 ../../library/pprint.rst:226
285+
#: ../../library/pprint.rst:121 ../../library/pprint.rst:224
306286
msgid "eval"
307287
msgstr "eval"
308288

309-
#: ../../library/pprint.rst:127
289+
#: ../../library/pprint.rst:155
310290
msgid "..."
311291
msgstr "..."
312292

313-
#: ../../library/pprint.rst:127
293+
#: ../../library/pprint.rst:155
314294
msgid "placeholder"
315295
msgstr "placeholder(佔位符號)"

0 commit comments

Comments
 (0)