1
1
# SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2022 , Python Software Foundation
2
+ # Copyright (C) 2001-2024 , Python Software Foundation
3
3
# This file is distributed under the same license as the Python package.
4
4
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
#
6
6
# Translators:
7
- # Jerry Chen <jerrychen9657@gmail.com>, 2017
8
- # 操旭 <caoxu3000@126.com>, 2017
9
- # Tony Tong <firfly.net@qq.com>, 2018
10
7
# ww song <sww4718168@gmail.com>, 2018
11
8
# Shengjing Zhu <zsj950618@gmail.com>, 2019
12
9
# Harry Liu. <harry.python@gmail.com>, 2020
13
- # Freesand Leo <yuqinju@163.com>, 2022
10
+ # Rafael Fontenelle <rffontenelle@gmail.com>, 2023
11
+ # Freesand Leo <yuqinju@163.com>, 2024
14
12
#
15
13
#, fuzzy
16
14
msgid ""
17
15
msgstr ""
18
16
"Project-Id-Version : Python 3.9\n "
19
17
"Report-Msgid-Bugs-To : \n "
20
- "POT-Creation-Date : 2022-11-04 14:34 +0000\n "
18
+ "POT-Creation-Date : 2024-03-22 21:26 +0000\n "
21
19
"PO-Revision-Date : 2017-02-16 17:42+0000\n "
22
- "Last-Translator : Freesand Leo <yuqinju@163.com>, 2022 \n "
23
- "Language-Team : Chinese (China) (https://www .transifex.com/python-doc/teams/5390/zh_CN/)\n "
20
+ "Last-Translator : Freesand Leo <yuqinju@163.com>, 2024 \n "
21
+ "Language-Team : Chinese (China) (https://app .transifex.com/python-doc/teams/5390/zh_CN/)\n "
24
22
"MIME-Version : 1.0\n "
25
23
"Content-Type : text/plain; charset=UTF-8\n "
26
24
"Content-Transfer-Encoding : 8bit\n "
@@ -116,8 +114,8 @@ msgid ""
116
114
"standard headers on some systems, you *must* include :file:`Python.h` before"
117
115
" any standard headers are included."
118
116
msgstr ""
119
- "由于Python可能会定义一些影响某些系统上标准头文件的预处理器定义 ,因此在包含任何标准头文件之前,您 *必须* include "
120
- "这个文件: `Python.h`。"
117
+ "由于 Python 可能会定义一些能在某些系统上影响标准头文件的预处理器定义 ,因此在包含任何标准头文件之前,你 *必须* 先包含 "
118
+ ":file: `Python.h`。"
121
119
122
120
#: ../../extending/extending.rst:72
123
121
msgid ""
@@ -148,9 +146,7 @@ msgid ""
148
146
"The next thing we add to our module file is the C function that will be "
149
147
"called when the Python expression ``spam.system(string)`` is evaluated "
150
148
"(we'll see shortly how it ends up being called)::"
151
- msgstr ""
152
- "下面要做的事是将 C 函数添加到我们的扩展模块,当 Python 表达式 ``spam.system(string)`` "
153
- "被求值时函数将被调用(我们很快就会看到它最终是如何被调用的)::"
149
+ msgstr "下面添加C函数到扩展模块,当调用 ``spam.system(string)`` 时会做出响应,(我们稍后会看到调用):"
154
150
155
151
#: ../../extending/extending.rst:99
156
152
msgid ""
@@ -159,8 +155,8 @@ msgid ""
159
155
"the C function. The C function always has two arguments, conventionally "
160
156
"named *self* and *args*."
161
157
msgstr ""
162
- "有个直接翻译参数列表的方法(例如单独的 ``“ls -l\" ``)到要传递给C函数的参数。C函数总是有两个参数,通常名字是 *self* 和 *args* "
163
- " 。"
158
+ "有个直接翻译参数列表的方法(举个例子,单独的 ``\" ls -l\" `` )到要传递给C函数的参数。C函数总是有两个参数,通常名字是 *self* 和 "
159
+ "*args* 。"
164
160
165
161
#: ../../extending/extending.rst:104
166
162
msgid ""
@@ -585,10 +581,8 @@ msgid ""
585
581
"distribution as :file:`Modules/xxmodule.c`. This file may be used as a "
586
582
"template or simply read as an example."
587
583
msgstr ""
588
- "更多关于模块的现实的例子包含在Python源码包的 :file:`Modules/xxmodule.c` "
589
- "中。这些文件可以用作你的代码模板,或者学习。脚本 modulator.py "
590
- "包含在源码发行版或Windows安装中,提供了一个简单的GUI,用来声明需要实现的函数和对象,并且可以生成供填入的模板。脚本在 "
591
- "Tools/modulator/ 目录。查看README以了解用法。"
584
+ "更多关于模块的现实的例子包含在 Python 源码发布包的 :file:`Modules/xxmodule.c` 中。 "
585
+ "此文件可以被用作代码模板或是学习样例。"
592
586
593
587
#: ../../extending/extending.rst:437
594
588
msgid ""
@@ -673,8 +667,8 @@ msgid ""
673
667
"interested, have a look at the implementation of the :option:`-c` command "
674
668
"line option in :file:`Modules/main.c` from the Python source code.)"
675
669
msgstr ""
676
- "幸运的是,Python解释器是比较方便回调的,并给标准Python函数提供了标准接口。(这里就不再详述解析Python代码作为输入的方式 ,如果有兴趣可以参考"
677
- " :file:`Python/pythonmain.c` 中的 :option:`-c` 命令代码 。)"
670
+ "幸运的是,Python解释器是比较方便回调的,并给标准Python函数提供了标准接口。(这里就不再详述解析Python字符串作为输入的方式 ,如果有兴趣可以参考"
671
+ " :file:`Python/pythonmain.c` 中的 :option:`-c` 命令行代码 。)"
678
672
679
673
#: ../../extending/extending.rst:499
680
674
msgid ""
@@ -685,8 +679,8 @@ msgid ""
685
679
"global variable --- or wherever you see fit. For example, the following "
686
680
"function might be part of a module definition::"
687
681
msgstr ""
688
- "调用Python函数 ,首先Python程序要传递Python函数对象。应该提供个函数(或其他接口)来实现。当调用这个函数时,用全局变量保存Python函数对象的指针,还要调用"
689
- " (:c:func:`Py_INCREF`) 来增加引用计数,当然不用全局变量也没什么关系。例如如下: "
682
+ "调用Python函数很简单 ,首先Python程序要传递Python函数对象。应该提供个函数(或其他接口)来实现。当调用这个函数时,用全局变量保存Python函数对象的指针,还要调用"
683
+ " (:c:func:`Py_INCREF`) 来增加引用计数,当然不用全局变量也没什么关系。举个例子,如下函数可能是模块定义的一部分: "
690
684
691
685
#: ../../extending/extending.rst:529
692
686
msgid ""
@@ -746,7 +740,7 @@ msgid ""
746
740
"should somehow :c:func:`Py_DECREF` the result, even (especially!) if you are"
747
741
" not interested in its value."
748
742
msgstr ""
749
- ":c:func:`PyEval_CallObject ` "
743
+ ":c:func:`PyObject_CallObject ` "
750
744
"的返回值总是“新”的:要么是一个新建的对象;要么是已有对象,但增加了引用计数。所以除非你想把结果保存在全局变量中,你需要对这个值使用 "
751
745
":c:func:`Py_DECREF`,即使你对里面的内容(特别!)不感兴趣。"
752
746
@@ -776,9 +770,9 @@ msgid ""
776
770
"simplest way to do this is to call :c:func:`Py_BuildValue`. For example, if"
777
771
" you want to pass an integral event code, you might use the following code::"
778
772
msgstr ""
779
- "依赖于具体的回调函数,你还要提供一个参数列表到 :c:func:`PyEval_CallObject ` "
780
- "。在某些情况下参数列表是由Python程序提供的,通过接口再传到回调函数 。这样就可以不改变形式直接传递。另外一些时候你要构造一个新的tuple来传递参数 。最简单的方法就是"
781
- " :c:func:`Py_BuildValue` 函数构造tuple。例如,你要传递一个事件对象时可以用 :"
773
+ "依赖于具体的回调函数,你还要提供一个参数列表到 :c:func:`PyObject_CallObject ` "
774
+ "。在某些情况下参数列表是由Python程序提供的,通过接口再传到回调函数对象 。这样就可以不改变形式直接传递。另外一些时候你要构造一个新的元组来传递参数 。最简单的方法就是"
775
+ " :c:func:`Py_BuildValue` 函数构造tuple。举个例子,你要传递一个事件代码时可以用如下代码 :"
782
776
783
777
#: ../../extending/extending.rst:606
784
778
msgid ""
@@ -797,7 +791,7 @@ msgid ""
797
791
" in the above example, we use :c:func:`Py_BuildValue` to construct the "
798
792
"dictionary. ::"
799
793
msgstr ""
800
- "你还需要注意 ,用关键字参数调用 :c:func:`PyObject_Call` ,需要支持普通参数和关键字参数。有如如上例子中,我们使用 "
794
+ "当你调用函数时还需要注意 ,用关键字参数调用 :c:func:`PyObject_Call` ,需要支持普通参数和关键字参数。有如如上例子中,我们使用 "
801
795
":c:func:`Py_BuildValue` 来构造字典。"
802
796
803
797
#: ../../extending/extending.rst:628
@@ -833,7 +827,7 @@ msgstr ""
833
827
msgid ""
834
828
"Note that any Python object references which are provided to the caller are "
835
829
"*borrowed* references; do not decrement their reference count!"
836
- msgstr "注意任何由调用者提供的Python对象引用是 *借来的* 引用;不要递减它们的引用计数!"
830
+ msgstr "注意任何由调用者提供的 Python 对象引用是 *借来的* 引用;不要递减它们的引用计数!"
837
831
838
832
#: ../../extending/extending.rst:650
839
833
msgid "Some example calls::"
@@ -875,7 +869,7 @@ msgstr "嵌套的元组在使用关键字参数时无法生效,不在 *kwlist*
875
869
msgid ""
876
870
"Here is an example module which uses keywords, based on an example by Geoff "
877
871
"Philbrick (philbrick@hks.com)::"
878
- msgstr "如下是使用关键字参数的例子模块 ,作者是 Geoff Philbrick (phibrick @hks.com):"
872
+ msgstr "如下例子是使用关键字参数的例子模块 ,作者是 Geoff Philbrick (philbrick @hks.com):"
879
873
880
874
#: ../../extending/extending.rst:800
881
875
msgid "Building Arbitrary Values"
@@ -910,8 +904,8 @@ msgid ""
910
904
msgstr ""
911
905
"一个与 :c:func:`PyArg_ParseTuple` "
912
906
"的不同是,后面可能需要的要求返回一个元组(Python参数里诶包总是在内部描述为元组),比如用于传递给其他Python函数以参数。 "
913
- ":c:func:`Py_BuildValue` 并不总是生成元组,在多于1个参数时会生成元组,而如果没有参数则返回 ``None`` "
914
- ",一个参数则直接返回该参数的对象。如果要求强制生成一个长度为空的元组 ,或包含一个元素的元组,需要在格式字符串中加上括号。"
907
+ ":c:func:`Py_BuildValue` 并不总是生成元组,在多于1个格式字符串时会生成元组,而如果格式字符串为空则返回 ``None`` "
908
+ ",一个参数则直接返回该参数的对象。如果要求强制生成一个长度为0的元组 ,或包含一个元素的元组,需要在格式字符串中加上括号。"
915
909
916
910
#: ../../extending/extending.rst:820
917
911
msgid ""
@@ -930,8 +924,8 @@ msgid ""
930
924
"``new`` and ``delete`` are used with essentially the same meaning and we'll "
931
925
"restrict the following discussion to the C case."
932
926
msgstr ""
933
- "在C/C++语言中,程序员负责动态分配和回收堆(heap)当中的内存 。在C里,通过函数 :c:func:`malloc` 和 "
934
- ":c:func:`free` 来完成。在C++里是操作 ``new`` 和 ``delete`` 来实现相同的功能。"
927
+ "在C/C++语言中,程序员负责动态分配和回收堆heap当中的内存 。在C里,通过函数 :c:func:`malloc` 和 :c:func:`free` "
928
+ "来完成。在C++里是操作 ``new`` 和 ``delete`` 来实现相同的功能。"
935
929
936
930
#: ../../extending/extending.rst:854
937
931
msgid ""
@@ -1561,7 +1555,7 @@ msgstr ""
1561
1555
1562
1556
#: ../../extending/extending.rst:1369
1563
1557
msgid "Footnotes"
1564
- msgstr "脚注 "
1558
+ msgstr "备注 "
1565
1559
1566
1560
#: ../../extending/extending.rst:1370
1567
1561
msgid ""
0 commit comments