@@ -589,7 +589,7 @@ msgstr ""
589589msgid ""
590590":meth:`writeheader` now also returns the value returned by the "
591591":meth:`csvwriter.writerow` method it uses internally."
592- msgstr ""
592+ msgstr "现在 :meth:`writeheader` 也返回其内部使用的 :meth:`csvwriter.writerow` 方法的返回值。 "
593593
594594#: ../../library/csv.rst:484
595595msgid "Examples"
@@ -601,11 +601,11 @@ msgstr "读取 CSV 文件最简单的一个例子::"
601601
602602#: ../../library/csv.rst:494
603603msgid "Reading a file with an alternate format::"
604- msgstr ""
604+ msgstr "读取其他格式的文件:: "
605605
606606#: ../../library/csv.rst:502
607607msgid "The corresponding simplest possible writing example is::"
608- msgstr ""
608+ msgstr "相应最简单的写入示例是:: "
609609
610610#: ../../library/csv.rst:509
611611msgid ""
@@ -614,28 +614,31 @@ msgid ""
614614":func:`locale.getpreferredencoding`). To decode a file using a different "
615615"encoding, use the ``encoding`` argument of open::"
616616msgstr ""
617+ "由于使用 :func:`open` 来读取 CSV 文件,因此默认情况下,将使用系统默认编码来解码文件并转换为 unicode(请参阅 "
618+ ":func:`locale.getpreferredencoding`)。要使用其他编码来解码文件,请使用 open 的 ``encoding`` "
619+ "参数::"
617620
618621#: ../../library/csv.rst:520
619622msgid ""
620623"The same applies to writing in something other than the system default "
621624"encoding: specify the encoding argument when opening the output file."
622- msgstr ""
625+ msgstr "这同样适用于写入非系统默认编码的内容:打开输出文件时,指定 encoding 参数。 "
623626
624627#: ../../library/csv.rst:523
625628msgid "Registering a new dialect::"
626- msgstr ""
629+ msgstr "注册一个新的变种:: "
627630
628631#: ../../library/csv.rst:530
629632msgid ""
630633"A slightly more advanced use of the reader --- catching and reporting "
631634"errors::"
632- msgstr ""
635+ msgstr "Reader 的更高级用法——捕获并报告错误:: "
633636
634637#: ../../library/csv.rst:542
635638msgid ""
636639"And while the module doesn't directly support parsing strings, it can easily"
637640" be done::"
638- msgstr ""
641+ msgstr "尽管该模块不直接支持解析字符串,但仍可如下轻松完成:: "
639642
640643#: ../../library/csv.rst:551
641644msgid "Footnotes"
@@ -649,3 +652,6 @@ msgid ""
649652"safe to specify ``newline=''``, since the csv module does its own "
650653"(:term:`universal <universal newlines>`) newline handling."
651654msgstr ""
655+ "如果没有指定 ``newline=''``,则嵌入引号中的换行符将无法正确解析,并且在写入时,使用 ``\\ r\\ n`` 换行的平台会有多余的 "
656+ "``\\ r`` 写入。由于 csv 模块会执行自己的(:term:`通用 <universal newlines>`)换行符处理,因此指定 "
657+ "``newline=''`` 应该总是安全的。"
0 commit comments