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

Skip to content

Commit 1f78f26

Browse files
committed
[po] auto sync bot
1 parent 70fbf89 commit 1f78f26

4 files changed

Lines changed: 75 additions & 63 deletions

File tree

extending/extending.po

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ msgid ""
4646
" C source file by including the header ``\"Python.h\"``."
4747
msgstr ""
4848
"为了支持扩展,Python API定义了一系列函数、宏和变量,提供了对Python运行时系统的访问支持。Python的C API由C源码组成,并包含 "
49-
"\"Python.h\" 头文件。"
49+
"`\"Python.h\"` 头文件。"
5050

5151
#: ../../extending/extending.rst:20
5252
msgid ""
@@ -117,18 +117,20 @@ msgid ""
117117
"file does not exist on your system, it declares the functions "
118118
":c:func:`malloc`, :c:func:`free` and :c:func:`realloc` directly."
119119
msgstr ""
120-
"所有用户可见的符号都定义自爱 :file:`Python.h` 中,并拥有前缀 ``Py`` 或 ``PY`` "
121-
",除了那些已经定义在i包准头文件的。为了方便,以及为了让Python解释器应用广泛, ``Python.h`` 也包含了少量标准头文件 "
122-
"``<stdio.h>````<string.h>````<errno.h>`` 和 ``<stdlib.h>`` "
123-
"如果后面的头文件在你的系统上不存在,还会直接声明函数 :c:func:`malloc`:c:func:`free` 和 "
120+
"所有用户可见的符号都定义自 :file:`Python.h` 中,并拥有前缀 ``Py`` 或 ``PY`` ,除了那些已经定义在标准头文件的。 "
121+
"为了方便,以及由于其在 Python 解释器中广泛应用,``\"Python.h\"`` 也包含了少量标准头文件: "
122+
"``<stdio.h>````<string.h>````<errno.h>`` 和 ``<stdlib.h>`` "
123+
"如果后面的头文件在你的系统上不存在,还会直接声明函数 :c:func:`malloc`:c:func:`free` 和 "
124124
":c:func:`realloc` 。"
125125

126126
#: ../../extending/extending.rst:79
127127
msgid ""
128128
"The next thing we add to our module file is the C function that will be "
129129
"called when the Python expression ``spam.system(string)`` is evaluated "
130130
"(we'll see shortly how it ends up being called)::"
131-
msgstr "下面添加C代码到扩展模块,当调用 \"spam.system(string)\" 时会做出响应:"
131+
msgstr ""
132+
"下面要做的事是将 C 函数添加到我们的扩展模块,当 Python 表达式 ``spam.system(string)`` "
133+
"被求值时函数将被调用(我们很快就会看到它最终是如何被调用的)::"
132134

133135
#: ../../extending/extending.rst:95
134136
msgid ""
@@ -157,9 +159,10 @@ msgid ""
157159
"determine the required types of the arguments as well as the types of the C "
158160
"variables into which to store the converted values. More about this later."
159161
msgstr ""
160-
"args "
161-
"参数是一个指向Python的tuple对象的指针,包含参数。每个tuple子项对应一个调用参数。这些参数也全都是Python对象,所以需要先转换成C值。函数"
162-
" :c:func:`PyArg_ParseTuple()` 检查参数类型并转换成C值。它使用模板字符串检测需要的参数类型。细节在后面讲。"
162+
"*args* 参数是指向一个 Python 的 tuple 对象的指针,其中包含参数。 每个 tuple 项对应一个调用参数。 这些参数也全都是 "
163+
"Python 对象 --- 要在我们的 C 函数中使用它们就需要先将其转换为 C 值。 Python API 中的函数 "
164+
":c:func:`PyArg_ParseTuple` 会检查参数类型并将其转换为 C 值。 它使用模板字符串确定需要的参数类型以及存储被转换的值的 C "
165+
"变量类型。 细节将稍后说明。"
163166

164167
#: ../../extending/extending.rst:112
165168
msgid ""
@@ -317,11 +320,11 @@ msgid ""
317320
" particular range or must satisfy other conditions, "
318321
":c:data:`PyExc_ValueError` is appropriate."
319322
msgstr ""
320-
"选择抛出哪个异常完全是你的个人爱好了。有一系列的C对象代表了内置Python异常,例如 "
321-
":c:data:`PyExc_ZeroDivisionError` ,你可以直接使用。当然,你可能选择更合适的异常,不过别使用 "
322-
":c:data:`PyExc_TypeError` 告知文件打开失败(有个更合适的 :c:data:`PyExc_IOError` "
323-
")。如果参数列表有误, :c:func:`PyArg_ParseTuple` 通常会抛出 :c:data:`PyExc_TypeError` "
324-
"。如果参数值域有误, PyExc_ValueError 更合适一些。"
323+
"选择引发哪个异常完全取决于你的喜好。 所有内置的 Python 异常都有对应的预声明 C 对象,例如 "
324+
":c:data:`PyExc_ZeroDivisionError`,你可以直接使用它们。 当然,你应当明智地选择异常 --- 不要使用 "
325+
":c:data:`PyExc_TypeError` 来表示一个文件无法被打开 (那大概应该用 :c:data:`PyExc_IOError`)。 "
326+
"如果参数列表有问题,:c:func:`PyArg_ParseTuple` 函数通常会引发 :c:data:`PyExc_TypeError` "
327+
"如果你想要一个参数的值必须处于特定范围之内或必须满足其他条件,则适宜使用 :c:data:`PyExc_ValueError`。"
325328

326329
#: ../../extending/extending.rst:202
327330
msgid ""
@@ -393,9 +396,9 @@ msgid ""
393396
"which it points (so in Standard C, the variable :c:data:`command` should "
394397
"properly be declared as ``const char *command``)."
395398
msgstr ""
396-
"就是为了报告解释器一个异常而返回 *NULL* "
397-
"(表示函数返回错误)。如果执行正常则变量会拷贝到本地,后面的变量都应该以指针的方式提供,以方便设置变量。本例中的command会被声明为( "
398-
"\"const char* command\" 。)"
399+
"如果在参数列表中检测到错误,将会返回 *NULL* (返回对象指针的函数的错误指示器) , 依据 :c:func:`PyArg_ParseTuple` "
400+
"所设置的异常。 在其他情况下参数的字符串值会被拷贝到局部变量 :c:data:`command`。 这是一个指针赋值,你不应该修改它所指向的字符串 "
401+
"(所以在标准 C 中,变量 :c:data:`command` 应当被正确地声明为 ``const char *command``)。"
399402

400403
#: ../../extending/extending.rst:279
401404
msgid ""

faq/design.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# Translators:
77
# Yinuo Huang <[email protected]>, 2018
88
# ww song <[email protected]>, 2018
9-
# tom smith, 2019
109
# Freesand Leo <[email protected]>, 2019
10+
# tom smith, 2019
1111
#
1212
#, fuzzy
1313
msgid ""
@@ -16,7 +16,7 @@ msgstr ""
1616
"Report-Msgid-Bugs-To: \n"
1717
"POT-Creation-Date: 2019-01-01 10:14+0900\n"
1818
"PO-Revision-Date: 2017-02-16 17:42+0000\n"
19-
"Last-Translator: Freesand Leo <[email protected]>, 2019\n"
19+
"Last-Translator: tom smith, 2019\n"
2020
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2121
"MIME-Version: 1.0\n"
2222
"Content-Type: text/plain; charset=UTF-8\n"
@@ -133,7 +133,7 @@ msgid ""
133133
"the value stored for ``x`` is a (very good) approximation to the decimal "
134134
"value ``1.2``, but is not exactly equal to it. On a typical machine, the "
135135
"actual stored value is::"
136-
msgstr "为 ``x`` 存储的值是与十进制值的 ``1.2`` (非常接近) 的近似值,但不完全等于它。 在典型的机器上,实际存储的值是:"
136+
msgstr "为 ``x`` 存储的值是与十进制的值 ``1.2`` (非常接近) 的近似值,但不完全等于它。 在典型的机器上,实际存储的值是:"
137137

138138
#: ../../faq/design.rst:81
139139
msgid "which is exactly::"
@@ -244,22 +244,22 @@ msgstr ""
244244

245245
#: ../../faq/design.rst:150
246246
msgid "Why can't I use an assignment in an expression?"
247-
msgstr ""
247+
msgstr "为什么不能在表达式中赋值?"
248248

249249
#: ../../faq/design.rst:152
250250
msgid ""
251251
"Many people used to C or Perl complain that they want to use this C idiom:"
252-
msgstr ""
252+
msgstr "许多习惯于C或Perl的人抱怨,他们想要使用C 的这个特性:"
253253

254254
#: ../../faq/design.rst:160
255255
msgid "where in Python you're forced to write this::"
256-
msgstr ""
256+
msgstr "在Python中强制写成这样:"
257257

258258
#: ../../faq/design.rst:168
259259
msgid ""
260260
"The reason for not allowing assignment in Python expressions is a common, "
261261
"hard-to-find bug in those other languages, caused by this construct:"
262-
msgstr ""
262+
msgstr "不允许在python表达式中赋值的原因是这些其他语言中常见的、很难发现的错误,是由这个结构引起的:"
263263

264264
#: ../../faq/design.rst:180
265265
msgid ""

0 commit comments

Comments
 (0)