Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4227d8

Browse files
[po] auto sync
1 parent 7adecf3 commit d4227d8

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

faq/programming.po

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,10 +1104,10 @@ msgid ""
11041104
" ``\"{:04d}\".format(144)`` yields ``'0144'`` and "
11051105
"``\"{:.3f}\".format(1.0/3.0)`` yields ``'0.333'``."
11061106
msgstr ""
1107-
"例如要将数字 144 转换为字符串 '144',可使用内置类型构造器 :func:`str`。 如果想要表示为十六进制或八进制数,可使用内置函数 "
1108-
":func:`hex` 或 :func:`oct`。 想要更好地格式化,请参阅 :ref:`f-strings` 和 "
1109-
":ref:`formatstrings` 等小节,例如 ``\"{:04d}\".format(144)`` 生成 ``'0144'`` "
1110-
"``\"{:.3f}\".format(1.0/3.0)`` 生成 ``'0.333'``。"
1107+
"比如要把数字 144 转换为字符串 '144',可使用内置类型构造器 :func:`str`。如果要表示为十六进制或八进制数格式,可使用内置函数 "
1108+
":func:`hex` 或 :func:`oct`。更复杂的格式化方法请参阅 :ref:`f-strings` 和 "
1109+
":ref:`formatstrings` 等章节,比如 ``\"{:04d}\".format(144)`` 会生成 ``'0144'`` "
1110+
"``\"{:.3f}\".format(1.0/3.0)`` 则会生成 ``'0.333'``。"
11111111

11121112
#: ../../faq/programming.rst:874
11131113
msgid "How do I modify a string in place?"
@@ -1121,8 +1121,8 @@ msgid ""
11211121
"unicode data, try using an :class:`io.StringIO` object or the :mod:`array` "
11221122
"module::"
11231123
msgstr ""
1124-
"无法修改,因为字符串是不可变对象。 在大多数情况下,你应该使用你想要的各种部分来构造一个新字符串。 但是,如果你想要一个可以原地修改 Unicode "
1125-
"数据的对象,可尝试使用 :class:`io.StringIO` 对象或 :mod:`array` 模块::"
1124+
"无法修改,因为字符串是不可变对象。 在大多数情况下,只要将各个部分组合起来构造出一个新字符串即可。如果需要一个能原地修改 Unicode "
1125+
"数据的对象,可以试试 :class:`io.StringIO` 对象或 :mod:`array` 模块"
11261126

11271127
#: ../../faq/programming.rst:906
11281128
msgid "How do I use strings to call functions/methods?"
@@ -1138,12 +1138,11 @@ msgid ""
11381138
" advantage of this technique is that the strings do not need to match the "
11391139
"names of the functions. This is also the primary technique used to emulate "
11401140
"a case construct::"
1141-
msgstr ""
1142-
"最好的做法是使用一个将字符串映射到函数的字典。 这一技巧的主要优势在于字符串不必与函数名称一致。 这也是用于模拟其他语言中 case 结构的主要技巧::"
1141+
msgstr "最好的做法是采用一个字典,将字符串映射为函数。其主要优势就是字符串不必与函数名一样。这也是用来模拟 case 结构的主要技巧:"
11431142

11441143
#: ../../faq/programming.rst:925
11451144
msgid "Use the built-in function :func:`getattr`::"
1146-
msgstr "使用内置函数 :func:`getattr` ::"
1145+
msgstr "利用内置函数 :func:`getattr` "
11471146

11481147
#: ../../faq/programming.rst:930
11491148
msgid ""
@@ -1153,11 +1152,11 @@ msgstr "请注意 :func:`getattr` 可用于任何对象,包括类、类实例
11531152

11541153
#: ../../faq/programming.rst:933
11551154
msgid "This is used in several places in the standard library, like this::"
1156-
msgstr "在标准库中多次使用了这个技巧,例如::"
1155+
msgstr "标准库就多次使用了这个技巧,例如"
11571156

11581157
#: ../../faq/programming.rst:946
11591158
msgid "Use :func:`locals` to resolve the function name::"
1160-
msgstr "使用 :func:`locals` 来解析出函数名::"
1159+
msgstr " :func:`locals` 解析出函数名:"
11611160

11621161
#: ../../faq/programming.rst:958
11631162
msgid ""
@@ -1184,11 +1183,11 @@ msgstr "由于通常只在一次读取一行文本时才需要这样做,所以
11841183

11851184
#: ../../faq/programming.rst:977
11861185
msgid "Is there a scanf() or sscanf() equivalent?"
1187-
msgstr "是否有 scanf() 或 sscanf() 的对应物?"
1186+
msgstr "是否有 scanf() 或 sscanf() 的等价函数?"
11881187

11891188
#: ../../faq/programming.rst:979
11901189
msgid "Not as such."
1191-
msgstr "没有这样的对应物。"
1190+
msgstr "没有。"
11921191

11931192
#: ../../faq/programming.rst:981
11941193
msgid ""
@@ -1199,15 +1198,15 @@ msgid ""
11991198
"parameter which is useful if the line uses something other than whitespace "
12001199
"as a separator."
12011200
msgstr ""
1202-
"对于简单的输入解析,最方便的做法通常是使用字符串对象的 :meth:`~str.split` 方法将一行内容拆解为以空格分隔的单词,然后使用 "
1203-
":func:`int` 或 :func:`float` 将表示十进制数的字符串转换为数值。 ``split()`` 支持可选的 \"sep\" "
1204-
"形参,适用于内容行使用空格符以外的分隔符的情况。"
1201+
"如果要对简单的输入进行解析,最容易的做法通常是利用字符串对象的 :meth:`~str.split` 方法将一行按空白符分隔拆分为多个单词,然后用 "
1202+
":func:`int` 或 :func:`float` 将十进制数字符串转换为数字值。 ``split()`` 支持可选的 \"sep\" "
1203+
"形参,适用于分隔符不用空白符的情况。"
12051204

12061205
#: ../../faq/programming.rst:987
12071206
msgid ""
12081207
"For more complicated input parsing, regular expressions are more powerful "
12091208
"than C's :c:func:`sscanf` and better suited for the task."
1210-
msgstr "以于更复杂的输入解析,正则表达式会比 C :c:func:`sscanf` 更强大,也更适合此类任务。"
1209+
msgstr "如果要对更复杂的输入进行解析,那么正则表达式要比 C 语言的 :c:func:`sscanf` 更强大,也更合适。"
12111210

12121211
#: ../../faq/programming.rst:992
12131212
msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?"
@@ -1229,7 +1228,7 @@ msgstr "我的程序太慢了。该如何加快速度?"
12291228
msgid ""
12301229
"That's a tough one, in general. First, here are a list of things to "
12311230
"remember before diving further:"
1232-
msgstr "总的来说,这是个棘手的问题。首先,下面列出了深入了解前需要记住的事情:"
1231+
msgstr "总的来说,这是个棘手的问题。在进一步讨论之前,首先应该记住以下几件事:"
12331232

12341233
#: ../../faq/programming.rst:1006
12351234
msgid ""
@@ -1241,7 +1240,7 @@ msgstr "不同的 Python 实现具有不同的性能特点。 本 FAQ 着重解
12411240
msgid ""
12421241
"Behaviour can vary across operating systems, especially when talking about "
12431242
"I/O or multi-threading."
1244-
msgstr "行为可能因操作系统而异,尤其是在谈论 I / O 或多线程时。"
1243+
msgstr "不同操作系统可能会有不同表现,尤其是涉及 I/O 和多线程时。"
12451244

12461245
#: ../../faq/programming.rst:1010
12471246
msgid ""

0 commit comments

Comments
 (0)