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

Skip to content

Commit 7d77824

Browse files
[po] auto sync
1 parent 85af4e2 commit 7d77824

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

c-api/intro.po

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ msgid ""
221221
"A use for ``Py_UNREACHABLE()`` is following a call a function that never "
222222
"returns but that is not declared :c:macro:`_Py_NO_RETURN`."
223223
msgstr ""
224+
"``Py_UNREACHABLE()`` 的一个用法是调用一个不会返回,但却没有声明 :c:macro:`_Py_NO_RETURN` 的函数之后。"
224225

225226
#: ../../c-api/intro.rst:122
226227
msgid ""
@@ -230,6 +231,8 @@ msgid ""
230231
"case, it's better to report the error to the caller. If the error cannot be"
231232
" reported to caller, :c:func:`Py_FatalError` can be used."
232233
msgstr ""
234+
"如果一个代码路径不太可能是正常代码,但在特殊情况下可以到达,就不能使用该宏。例如,在低内存条件下,或者一个系统调用返回超出预期范围值,诸如此类,最好将错误报告给调用者。如果无法将错误报告给调用者,可以使用"
235+
" :c:func:`Py_FatalError` 。"
233236

234237
#: ../../c-api/intro.rst:132
235238
msgid "Return the absolute value of ``x``."
@@ -266,18 +269,22 @@ msgid ""
266269
"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the "
267270
"command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set)."
268271
msgstr ""
272+
"与 ``getenv(s)`` 类似,但是如果命令行上传递了 :option:`-E` ,则返回 ``NULL`` (即如果设置了 "
273+
"``Py_IgnoreEnvironmentFlag`` )。"
269274

270275
#: ../../c-api/intro.rst:173
271276
msgid ""
272277
"Use this for unused arguments in a function definition to silence compiler "
273278
"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``."
274279
msgstr ""
280+
"用于函数定义中未使用的参数,从而消除编译器警告。例如: ``int func(int a, int Py_UNUSED(b)) { return a; "
281+
"}`` 。"
275282

276283
#: ../../c-api/intro.rst:180
277284
msgid ""
278285
"Use this for deprecated declarations. The macro must be placed before the "
279286
"symbol name."
280-
msgstr ""
287+
msgstr "弃用声明。该宏必须放置在符号名称前。"
281288

282289
#: ../../c-api/intro.rst:183 ../../c-api/intro.rst:198
283290
#: ../../c-api/intro.rst:216
@@ -286,31 +293,33 @@ msgstr "示例::"
286293

287294
#: ../../c-api/intro.rst:187
288295
msgid "MSVC support was added."
289-
msgstr ""
296+
msgstr "添加了 MSVC 支持。"
290297

291298
#: ../../c-api/intro.rst:192
292299
msgid ""
293300
"Creates a variable with name ``name`` that can be used in docstrings. If "
294301
"Python is built without docstrings, the value will be empty."
295-
msgstr ""
302+
msgstr "创建一个可以在文档字符串中使用的,名字为 ``name`` 的变量。如果不和文档字符串一起构建 Python,该值将为空。"
296303

297304
#: ../../c-api/intro.rst:195
298305
msgid ""
299306
"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python "
300307
"without docstrings, as specified in :pep:`7`."
301308
msgstr ""
309+
"如 :pep:`7` 所述,使用 :c:macro:`PyDoc_STRVAR` 作为文档字符串,以支持不和文档字符串一起构建 Python 的情况。"
302310

303311
#: ../../c-api/intro.rst:210
304312
msgid ""
305313
"Creates a docstring for the given input string or an empty string if "
306314
"docstrings are disabled."
307-
msgstr ""
315+
msgstr "为给定的字符串输入创建一个文档字符串,或者当文档字符串被禁用时,创建一个空字符串。"
308316

309317
#: ../../c-api/intro.rst:213
310318
msgid ""
311319
"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python"
312320
" without docstrings, as specified in :pep:`7`."
313321
msgstr ""
322+
"如 :pep:`7` 所述,使用 :c:macro:`PyDoc_STR` 指定文档字符串,以支持不和文档字符串一起构建 Python 的情况。"
314323

315324
#: ../../c-api/intro.rst:227
316325
msgid "Objects, Types and Reference Counts"
@@ -330,6 +339,11 @@ msgid ""
330339
"objects; since these must never be deallocated, they are typically static "
331340
":c:type:`PyTypeObject` objects."
332341
msgstr ""
342+
"多数 Python/C API 有一个或多个参数,以及一个 :c:type:`PyObject*` 类型的返回值。这种类型是指向任意 Python "
343+
"对象的不透明数据类型的指针。所有 Python 对象类型在大多数情况下都被 Python "
344+
"语言由相同的方式处理(例如,赋值,作用域规则,和参数传递),因此将它们由单个 C 类型表示才合适。几乎所有 Python "
345+
"对象存放在堆中:你不能声明一个类型为 :c:type:`PyObject` 的自动或静态的变量,只能声明类型为 :c:type:`PyObject*` "
346+
"的指针。type 对象是唯一的例外,因为它们永远不能被释放,所以它们通常是静态的 :c:type:`PyTypeObject` 对象。"
333347

334348
#: ../../c-api/intro.rst:242
335349
msgid ""

faq/programming.po

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# ppcfish <[email protected]>, 2019
1111
# Freesand Leo <[email protected]>, 2021
1212
# Dai Xu <[email protected]>, 2021
13+
# Jiuh-star <[email protected]>, 2021
1314
#
1415
#, fuzzy
1516
msgid ""
@@ -18,7 +19,7 @@ msgstr ""
1819
"Report-Msgid-Bugs-To: \n"
1920
"POT-Creation-Date: 2021-05-23 06:25+0000\n"
2021
"PO-Revision-Date: 2017-02-16 17:43+0000\n"
21-
"Last-Translator: Dai Xu <daixu61@hotmail.com>, 2021\n"
22+
"Last-Translator: Jiuh-star <jiuh.star@gmail.com>, 2021\n"
2223
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2324
"MIME-Version: 1.0\n"
2425
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1326,12 +1327,18 @@ msgid ""
13261327
"skills, you can also :ref:`write a C extension module <extending-index>` "
13271328
"yourself."
13281329
msgstr ""
1330+
"如果你已经达到纯 Python 允许的限制,那么有一些工具可以让你走得更远。 例如, `Cython <http://cython.org>`_ "
1331+
"可以将稍微修改的 Python 代码版本编译为 C 扩展,并且可以在许多不同的平台上使用。 Cython "
1332+
"可以利用编译(和可选的类型注释)来使代码明显快于解释运行时的速度。 如果您对 C 编程技能有信心,也可以自己 :ref:`编写 C 扩展模块 "
1333+
"<extending-index>` 。"
13291334

13301335
#: ../../faq/programming.rst:1056
13311336
msgid ""
13321337
"The wiki page devoted to `performance tips "
13331338
"<https://wiki.python.org/moin/PythonSpeed/PerformanceTips>`_."
13341339
msgstr ""
1340+
"专门介绍 `性能提示 <https://wiki.python.org/moin/PythonSpeed/PerformanceTips>`_ "
1341+
"的wiki页面。"
13351342

13361343
#: ../../faq/programming.rst:1062
13371344
msgid "What is the most efficient way to concatenate many strings together?"
@@ -1567,7 +1574,7 @@ msgstr "以上生成了一个包含 3 个列表的列表,每个子列表的长
15671574
msgid ""
15681575
"Or, you can use an extension that provides a matrix datatype; `NumPy "
15691576
"<http://www.numpy.org/>`_ is the best known."
1570-
msgstr ""
1577+
msgstr "或者你还可以使用提供矩阵类型的扩展包;其中最著名的是 `NumPy <http://www.numpy.org/>`_。"
15711578

15721579
#: ../../faq/programming.rst:1255
15731580
msgid "How do I apply a method to a sequence of objects?"

0 commit comments

Comments
 (0)