|
7 | 7 | msgstr ""
|
8 | 8 | "Project-Id-Version: Python 3.12\n"
|
9 | 9 | "Report-Msgid-Bugs-To: \n"
|
10 |
| -"POT-Creation-Date: 2023-12-17 00:04+0000\n" |
| 10 | +"POT-Creation-Date: 2024-02-01 00:03+0000\n" |
11 | 11 | "PO-Revision-Date: 2023-11-08 15:06+0800\n"
|
12 | 12 | " Last-Translator: RockLeon <[email protected]>\n"
|
13 | 13 | "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
|
@@ -129,23 +129,24 @@ msgid "A short usage example::"
|
129 | 129 | msgstr "一個簡短的用法範例: ::"
|
130 | 130 |
|
131 | 131 | #: ../../library/csv.rst:89
|
| 132 | +#, fuzzy |
132 | 133 | msgid ""
|
133 | 134 | "Return a writer object responsible for converting the user's data into "
|
134 | 135 | "delimited strings on the given file-like object. *csvfile* can be any "
|
135 |
| -"object with a :func:`write` method. If *csvfile* is a file object, it " |
136 |
| -"should be opened with ``newline=''`` [1]_. An optional *dialect* parameter " |
137 |
| -"can be given which is used to define a set of parameters specific to a " |
138 |
| -"particular CSV dialect. It may be an instance of a subclass of the :class:" |
139 |
| -"`Dialect` class or one of the strings returned by the :func:`list_dialects` " |
140 |
| -"function. The other optional *fmtparams* keyword arguments can be given to " |
141 |
| -"override individual formatting parameters in the current dialect. For full " |
142 |
| -"details about dialects and formatting parameters, see the :ref:`csv-fmt-" |
143 |
| -"params` section. To make it as easy as possible to interface with modules " |
144 |
| -"which implement the DB API, the value :const:`None` is written as the empty " |
145 |
| -"string. While this isn't a reversible transformation, it makes it easier to " |
146 |
| -"dump SQL NULL data values to CSV files without preprocessing the data " |
147 |
| -"returned from a ``cursor.fetch*`` call. All other non-string data are " |
148 |
| -"stringified with :func:`str` before being written." |
| 136 | +"object with a :meth:`~io.TextIOBase.write` method. If *csvfile* is a file " |
| 137 | +"object, it should be opened with ``newline=''`` [1]_. An optional *dialect* " |
| 138 | +"parameter can be given which is used to define a set of parameters specific " |
| 139 | +"to a particular CSV dialect. It may be an instance of a subclass of the :" |
| 140 | +"class:`Dialect` class or one of the strings returned by the :func:" |
| 141 | +"`list_dialects` function. The other optional *fmtparams* keyword arguments " |
| 142 | +"can be given to override individual formatting parameters in the current " |
| 143 | +"dialect. For full details about dialects and formatting parameters, see " |
| 144 | +"the :ref:`csv-fmt-params` section. To make it as easy as possible to " |
| 145 | +"interface with modules which implement the DB API, the value :const:`None` " |
| 146 | +"is written as the empty string. While this isn't a reversible " |
| 147 | +"transformation, it makes it easier to dump SQL NULL data values to CSV files " |
| 148 | +"without preprocessing the data returned from a ``cursor.fetch*`` call. All " |
| 149 | +"other non-string data are stringified with :func:`str` before being written." |
149 | 150 | msgstr ""
|
150 | 151 | "回傳一個寫入器物件 (writer object),其負責在給定的類檔案物件 (file-like "
|
151 | 152 | "object) 上將使用者的資料轉換為分隔字串 (delimited string)。*csvfile* 可以為具"
|
@@ -261,19 +262,20 @@ msgid "Returned rows are now of type :class:`dict`."
|
261 | 262 | msgstr "回傳的列已成為型別 :class:`dict`。"
|
262 | 263 |
|
263 | 264 | #: ../../library/csv.rst:197
|
| 265 | +#, fuzzy |
264 | 266 | msgid ""
|
265 | 267 | "Create an object which operates like a regular writer but maps dictionaries "
|
266 | 268 | "onto output rows. The *fieldnames* parameter is a :mod:`sequence "
|
267 | 269 | "<collections.abc>` of keys that identify the order in which values in the "
|
268 |
| -"dictionary passed to the :meth:`writerow` method are written to file *f*. " |
269 |
| -"The optional *restval* parameter specifies the value to be written if the " |
270 |
| -"dictionary is missing a key in *fieldnames*. If the dictionary passed to " |
271 |
| -"the :meth:`writerow` method contains a key not found in *fieldnames*, the " |
272 |
| -"optional *extrasaction* parameter indicates what action to take. If it is " |
273 |
| -"set to ``'raise'``, the default value, a :exc:`ValueError` is raised. If it " |
274 |
| -"is set to ``'ignore'``, extra values in the dictionary are ignored. Any " |
275 |
| -"other optional or keyword arguments are passed to the underlying :class:" |
276 |
| -"`writer` instance." |
| 270 | +"dictionary passed to the :meth:`~csvwriter.writerow` method are written to " |
| 271 | +"file *f*. The optional *restval* parameter specifies the value to be " |
| 272 | +"written if the dictionary is missing a key in *fieldnames*. If the " |
| 273 | +"dictionary passed to the :meth:`~csvwriter.writerow` method contains a key " |
| 274 | +"not found in *fieldnames*, the optional *extrasaction* parameter indicates " |
| 275 | +"what action to take. If it is set to ``'raise'``, the default value, a :exc:" |
| 276 | +"`ValueError` is raised. If it is set to ``'ignore'``, extra values in the " |
| 277 | +"dictionary are ignored. Any other optional or keyword arguments are passed " |
| 278 | +"to the underlying :class:`writer` instance." |
277 | 279 | msgstr ""
|
278 | 280 | "建立一個物件,其運作上就像一般的寫入器,但可以將 dictionary map 到輸出的列"
|
279 | 281 | "上。參數 *fieldnames* 是一個鍵值的 :mod:`sequence <collections.abc>` 且可以辨"
|
@@ -495,13 +497,14 @@ msgid "Dialects and Formatting Parameters"
|
495 | 497 | msgstr "Dialect 與格式參數"
|
496 | 498 |
|
497 | 499 | #: ../../library/csv.rst:375
|
| 500 | +#, fuzzy |
498 | 501 | msgid ""
|
499 | 502 | "To make it easier to specify the format of input and output records, "
|
500 | 503 | "specific formatting parameters are grouped together into dialects. A "
|
501 |
| -"dialect is a subclass of the :class:`Dialect` class having a set of specific " |
502 |
| -"methods and a single :meth:`validate` method. When creating :class:`reader` " |
503 |
| -"or :class:`writer` objects, the programmer can specify a string or a " |
504 |
| -"subclass of the :class:`Dialect` class as the dialect parameter. In " |
| 504 | +"dialect is a subclass of the :class:`Dialect` class containing various " |
| 505 | +"attributes describing the format of the CSV file. When creating :class:" |
| 506 | +"`reader` or :class:`writer` objects, the programmer can specify a string or " |
| 507 | +"a subclass of the :class:`Dialect` class as the dialect parameter. In " |
505 | 508 | "addition to, or instead of, the *dialect* parameter, the programmer can also "
|
506 | 509 | "specify individual formatting parameters, which have the same names as the "
|
507 | 510 | "attributes defined below for the :class:`Dialect` class."
|
@@ -664,10 +667,11 @@ msgid "Writer Objects"
|
664 | 667 | msgstr "寫入器物件"
|
665 | 668 |
|
666 | 669 | #: ../../library/csv.rst:495
|
| 670 | +#, fuzzy |
667 | 671 | msgid ""
|
668 |
| -":class:`Writer` objects (:class:`DictWriter` instances and objects returned " |
| 672 | +":class:`writer` objects (:class:`DictWriter` instances and objects returned " |
669 | 673 | "by the :func:`writer` function) have the following public methods. A *row* "
|
670 |
| -"must be an iterable of strings or numbers for :class:`Writer` objects and a " |
| 674 | +"must be an iterable of strings or numbers for :class:`writer` objects and a " |
671 | 675 | "dictionary mapping fieldnames to strings or numbers (by passing them "
|
672 | 676 | "through :func:`str` first) for :class:`DictWriter` objects. Note that "
|
673 | 677 | "complex numbers are written out surrounded by parens. This may cause some "
|
|
0 commit comments