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

Skip to content

Commit 8c72861

Browse files
[po] auto sync
1 parent ea207e6 commit 8c72861

4 files changed

Lines changed: 71 additions & 31 deletions

File tree

c-api/tuple.po

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
# Translators:
77
# 操旭 <[email protected]>, 2017
88
# dykai <[email protected]>, 2019
9-
# Freesand Leo <[email protected]>, 2019
109
# ppcfish <[email protected]>, 2019
10+
# 伟 裴 <[email protected]>, 2020
11+
# Freesand Leo <[email protected]>, 2020
1112
#
1213
#, fuzzy
1314
msgid ""
@@ -16,7 +17,7 @@ msgstr ""
1617
"Report-Msgid-Bugs-To: \n"
1718
"POT-Creation-Date: 2020-08-20 03:54+0000\n"
1819
"PO-Revision-Date: 2017-02-16 17:39+0000\n"
19-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2019\n"
20+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
2021
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2122
"MIME-Version: 1.0\n"
2223
"Content-Type: text/plain; charset=UTF-8\n"
@@ -50,11 +51,11 @@ msgstr "如果 *p* 是一个元组对象或者元组类型的子类型的实例
5051
msgid ""
5152
"Return true if *p* is a tuple object, but not an instance of a subtype of "
5253
"the tuple type."
53-
msgstr "如果 *p* 是一个元组对象,而不是一个元组子类型的实例,则返回真值。"
54+
msgstr "如果 *p* 是一个元组对象,而不是一个元组类型的子类型实例,则返回真值。"
5455

5556
#: ../../c-api/tuple.rst:36
5657
msgid "Return a new tuple object of size *len*, or ``NULL`` on failure."
57-
msgstr ""
58+
msgstr "成功时返回一个新的元组对象,长度为 *len*,失败时返回``NULL``。"
5859

5960
#: ../../c-api/tuple.rst:41
6061
msgid ""
@@ -63,53 +64,61 @@ msgid ""
6364
"objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
6465
"``Py_BuildValue(\"(OO)\", a, b)``."
6566
msgstr ""
67+
"成功时返回一个新的元组对象,大小为 *n* ,失败时返回 ``NULL``。 元组值初始化为指向 Python 对象的后续 *n* 个 C 参数。 "
68+
"``PyTuple_Pack(2, a, b)`` 和 ``Py_BuildValue(\"(OO)\", a, b)`` 相等。"
6669

6770
#: ../../c-api/tuple.rst:48
6871
msgid "Take a pointer to a tuple object, and return the size of that tuple."
69-
msgstr ""
72+
msgstr "获取指向元组对象的指针,并返回该元组的大小。"
7073

7174
#: ../../c-api/tuple.rst:53
7275
msgid ""
7376
"Return the size of the tuple *p*, which must be non-``NULL`` and point to a "
7477
"tuple; no error checking is performed."
75-
msgstr ""
78+
msgstr "返回元组 *p* 的大小,它必须为非 ``NULL`` 并且指向一个元组;不执行错误检查。"
7679

7780
#: ../../c-api/tuple.rst:59
7881
msgid ""
7982
"Return the object at position *pos* in the tuple pointed to by *p*. If "
8083
"*pos* is out of bounds, return ``NULL`` and set an :exc:`IndexError` "
8184
"exception."
8285
msgstr ""
86+
"返回 *p* 所指向的元组中,位于 *pos* 处的对象。 如果 *pos* 超出界限,返回 ``NULL``,并抛出一个 "
87+
":exc:`IndexError` 异常。"
8388

8489
#: ../../c-api/tuple.rst:65
8590
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
86-
msgstr ""
91+
msgstr "类似于 :c:func:`PyTuple_GetItem`,但不检查其参数。"
8792

8893
#: ../../c-api/tuple.rst:70
8994
msgid ""
9095
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or"
9196
" ``NULL`` on failure. This is the equivalent of the Python expression "
9297
"``p[low:high]``. Indexing from the end of the list is not supported."
9398
msgstr ""
99+
"返回 *p* 所指向的元组的切片,在 *low* 和 *high* 之间,或者在失败时返回 ``NULL``。 这等同于 Python 表达式 "
100+
"``p[low:high]``。 不支持从列表末尾索引。"
94101

95102
#: ../../c-api/tuple.rst:77
96103
msgid ""
97104
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
98105
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
99106
"and set an :exc:`IndexError` exception."
100107
msgstr ""
108+
"在 *p* 指向的元组的 *pos* 位置插入对对象 *o* 的引用。 成功时返回 ``0``;如果 *pos* 越界,则返回 ``-1``,并抛出一个"
109+
" :exc:`IndexError` 异常。"
101110

102111
#: ../../c-api/tuple.rst:83
103112
msgid ""
104113
"This function \"steals\" a reference to *o* and discards a reference to an "
105114
"item already in the tuple at the affected position."
106-
msgstr ""
115+
msgstr "此函数会“窃取”对 *o* 的引用,并丢弃对元组中已在受影响位置的条目的引用。"
107116

108117
#: ../../c-api/tuple.rst:89
109118
msgid ""
110119
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
111120
"*only* be used to fill in brand new tuples."
112-
msgstr ""
121+
msgstr "类似于 :c:func:`PyTuple_SetItem`,但不进行错误检查,并且应该 *只是* 被用来填充全新的元组。"
113122

114123
#: ../../c-api/tuple.rst:94
115124
msgid ""
@@ -118,6 +127,8 @@ msgid ""
118127
"is being replaced; any reference in the tuple at position *pos* will be "
119128
"leaked."
120129
msgstr ""
130+
"这个宏会“偷走”一个对 *o* 的引用,但与 :c:func:`PyTuple_SetItem` 不同,它 *不会* "
131+
"丢弃对任何被替换项的引用;元组中位于 *pos* 位置的任何引用都将被泄漏。"
121132

122133
#: ../../c-api/tuple.rst:102
123134
msgid ""
@@ -133,10 +144,15 @@ msgid ""
133144
"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or "
134145
":exc:`SystemError`."
135146
msgstr ""
147+
"可以用于调整元组的大小。 *newsize* 将是元组的新长度。 因为元组 *被认为* 是不可变的,所以只有在对象仅有一个引用时,才应该使用它。 "
148+
"如果元组已经被代码的其他部分所引用,请不要使用此项。 元组在最后总是会增长或缩小。 把它看作是销毁旧元组并创建一个新元组,只会更有效。 成功时返回 "
149+
"``0`` 。 客户端代码不应假定 ``*p`` 的结果值将与调用此函数之前的值相同。 如果替换了 ``*p`` 引用的对象,则原始的 ``*p`` "
150+
"将被销毁。 失败时,返回``-1``,将 ``*p`` 设置为 ``NULL``,并引发 :exc:`MemoryError` 或者 "
151+
":exc:`SystemError`。"
136152

137153
#: ../../c-api/tuple.rst:115
138154
msgid "Struct Sequence Objects"
139-
msgstr ""
155+
msgstr "结构序列对象"
140156

141157
#: ../../c-api/tuple.rst:117
142158
msgid ""
@@ -145,23 +161,27 @@ msgid ""
145161
"also be accessed through attributes. To create a struct sequence, you first "
146162
"have to create a specific struct sequence type."
147163
msgstr ""
164+
"结构序列对象是等价于 :func:`~collections.namedtuple` 的 C 对象,即一个序列,其中的条目也可以通过属性访问。 "
165+
"要创建结构序列,你首先必须创建特定的结构序列类型。"
148166

149167
#: ../../c-api/tuple.rst:124
150168
msgid ""
151169
"Create a new struct sequence type from the data in *desc*, described below. "
152170
"Instances of the resulting type can be created with "
153171
":c:func:`PyStructSequence_New`."
154172
msgstr ""
173+
"根据 *desc* 中的数据创建一个新的结构序列类型,如下所述。 可以使用 :c:func:`PyStructSequence_New` "
174+
"创建结果类型的实例。"
155175

156176
#: ../../c-api/tuple.rst:130
157177
msgid "Initializes a struct sequence type *type* from *desc* in place."
158-
msgstr ""
178+
msgstr "从 *desc* 就地初始化结构序列类型 *type*。"
159179

160180
#: ../../c-api/tuple.rst:135
161181
msgid ""
162182
"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and "
163183
"``-1`` on failure."
164-
msgstr ""
184+
msgstr "与 ``PyStructSequence_InitType`` 相同,但成功时返回 ``0`` ,失败时返回 ``-1`` 。"
165185

166186
#: ../../c-api/tuple.rst:143
167187
msgid "Contains the meta information of a struct sequence type to create."
@@ -198,7 +218,7 @@ msgstr "``doc``"
198218

199219
#: ../../c-api/tuple.rst:150
200220
msgid "pointer to docstring for the type or ``NULL`` to omit"
201-
msgstr ""
221+
msgstr "指向要忽略类型的文档字符串或 ``NULL`` 的指针"
202222

203223
#: ../../c-api/tuple.rst:153
204224
msgid "``fields``"
@@ -210,7 +230,7 @@ msgstr "``PyStructSequence_Field *``"
210230

211231
#: ../../c-api/tuple.rst:153
212232
msgid "pointer to ``NULL``-terminated array with field names of the new type"
213-
msgstr ""
233+
msgstr "指向以 ``NULL`` 结尾的数组的指针,其字段名称为新类型"
214234

215235
#: ../../c-api/tuple.rst:156
216236
msgid "``n_in_sequence``"
@@ -222,7 +242,7 @@ msgstr "``int``"
222242

223243
#: ../../c-api/tuple.rst:156
224244
msgid "number of fields visible to the Python side (if used as tuple)"
225-
msgstr ""
245+
msgstr "Python侧可见的字段数(如果用作元组)"
226246

227247
#: ../../c-api/tuple.rst:163
228248
msgid ""
@@ -231,52 +251,58 @@ msgid ""
231251
":attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which"
232252
" field of the struct sequence is described."
233253
msgstr ""
254+
"描述结构序列的一个字段。 当结构序列被建模为元组时,所有字段的类型都是 :c:type:`PyObject*`。 在 "
255+
":c:type:`PyStructSequence_Desc` 的 :attr:`fields` 数组中的索引确定了结构序列描述的是哪个字段。"
234256

235257
#: ../../c-api/tuple.rst:171
236258
msgid ""
237259
"name for the field or ``NULL`` to end the list of named fields, set to "
238260
":c:data:`PyStructSequence_UnnamedField` to leave unnamed"
239261
msgstr ""
262+
"字段的名称或 ``NULL`` ,若要结束命名字段的列表,请设置为 :c:data:`PyStructSequence_UnnamedField` "
263+
"以保留未命名字段"
240264

241265
#: ../../c-api/tuple.rst:176
242266
msgid "field docstring or ``NULL`` to omit"
243-
msgstr ""
267+
msgstr "要忽略的字段文档字符串或 ``NULL``"
244268

245269
#: ../../c-api/tuple.rst:182
246270
msgid "Special value for a field name to leave it unnamed."
247-
msgstr ""
271+
msgstr "字段名的特殊值将保持未命名状态。"
248272

249273
#: ../../c-api/tuple.rst:184
250274
msgid "The type was changed from ``char *``."
251-
msgstr ""
275+
msgstr "这个类型已从 ``char *`` 更改。"
252276

253277
#: ../../c-api/tuple.rst:190
254278
msgid ""
255279
"Creates an instance of *type*, which must have been created with "
256280
":c:func:`PyStructSequence_NewType`."
257-
msgstr ""
281+
msgstr "创建 *type* 的实例,该实例必须使用 :c:func:`PyStructSequence_NewType` 创建。"
258282

259283
#: ../../c-api/tuple.rst:196
260284
msgid ""
261285
"Return the object at position *pos* in the struct sequence pointed to by "
262286
"*p*. No bounds checking is performed."
263-
msgstr ""
287+
msgstr "返回 *p* 所指向的结构序列中,位于 *pos* 处的对象。不需要进行边界检查。"
264288

265289
#: ../../c-api/tuple.rst:202
266290
msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
267-
msgstr ""
291+
msgstr ":c:func:`PyStructSequence_GetItem` 的宏版本。"
268292

269293
#: ../../c-api/tuple.rst:207
270294
msgid ""
271295
"Sets the field at index *pos* of the struct sequence *p* to value *o*. Like"
272296
" :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand new "
273297
"instances."
274298
msgstr ""
299+
"将结构序列 *p* 的索引 *pos* 处的字段设置为值 *o*。 与 :c:func:`PyTuple_SET_ITEM` "
300+
"一样,它应该只用于填充全新的实例。"
275301

276302
#: ../../c-api/tuple.rst:213 ../../c-api/tuple.rst:222
277303
msgid "This function \"steals\" a reference to *o*."
278-
msgstr ""
304+
msgstr "这个函数“窃取”了指向 *o* 的一个引用。"
279305

280306
#: ../../c-api/tuple.rst:218
281307
msgid "Macro equivalent of :c:func:`PyStructSequence_SetItem`."
282-
msgstr ""
308+
msgstr ":c:func:`PyStructSequence_SetItem` 的宏版本。"

c-api/unicode.po

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# 做题家 <[email protected]>, 2019
99
# ppcfish <[email protected]>, 2019
1010
# Freesand Leo <[email protected]>, 2020
11+
# 伟 裴 <[email protected]>, 2020
1112
#
1213
#, fuzzy
1314
msgid ""
@@ -16,7 +17,7 @@ msgstr ""
1617
"Report-Msgid-Bugs-To: \n"
1718
"POT-Creation-Date: 2020-08-20 03:54+0000\n"
1819
"PO-Revision-Date: 2017-02-16 17:39+0000\n"
19-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
20+
"Last-Translator: 伟 裴 <sky_wander@outlook.com>, 2020\n"
2021
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2122
"MIME-Version: 1.0\n"
2223
"Content-Type: text/plain; charset=UTF-8\n"
@@ -26,7 +27,7 @@ msgstr ""
2627

2728
#: ../../c-api/unicode.rst:6
2829
msgid "Unicode Objects and Codecs"
29-
msgstr ""
30+
msgstr "Unicode对象和编码解码器"
3031

3132
#: ../../c-api/unicode.rst:12
3233
msgid "Unicode Objects"
@@ -41,6 +42,8 @@ msgid ""
4142
"65536; otherwise, code points must be below 1114112 (which is the full "
4243
"Unicode range)."
4344
msgstr ""
45+
"自从python3.3中实现了:pep:`393` "
46+
"以来,Unicode对象在内部使用各种表示形式,以便在保持内存效率的同时处理完整范围的Unicode字符。对于所有代码点都低于128、256或65536的字符串,有一些特殊情况;否则,代码点必须低于1114112(这是完整的Unicode范围)。"
4447

4548
#: ../../c-api/unicode.rst:20
4649
msgid ""

library/asyncio-protocol.po

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -809,12 +809,16 @@ msgid ""
809809
":meth:`loop.connect_read_pipe`, and :meth:`loop.connect_write_pipe` accept "
810810
"factories that return streaming protocols."
811811
msgstr ""
812+
"事件方法,例如 :meth:`loop.create_server`, :meth:`loop.create_unix_server`, "
813+
":meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, "
814+
":meth:`loop.connect_accepted_socket`, :meth:`loop.connect_read_pipe` 和 "
815+
":meth:`loop.connect_write_pipe` 都接受返回流式协议的工厂。"
812816

813817
#: ../../library/asyncio-protocol.rst:544
814818
msgid ""
815819
"Called when some data is received. *data* is a non-empty bytes object "
816820
"containing the incoming data."
817-
msgstr ""
821+
msgstr "当收到数据时被调用。 *data* 为包含入站数据的非空字节串对象。"
818822

819823
#: ../../library/asyncio-protocol.rst:547
820824
msgid ""
@@ -823,26 +827,31 @@ msgid ""
823827
" make your parsing generic and flexible. However, data is always received in"
824828
" the correct order."
825829
msgstr ""
830+
"数据是否会被缓冲、分块或重组取决于具体传输。 通常,你不应依赖于特定的语义而应使你的解析具有通用性和灵活性。 但是,数据总是要以正确的顺序被接收。"
826831

827832
#: ../../library/asyncio-protocol.rst:552
828833
msgid ""
829834
"The method can be called an arbitrary number of times while a connection is "
830835
"open."
831-
msgstr ""
836+
msgstr "此方法在连接打开期间可以被调用任意次数。"
832837

833838
#: ../../library/asyncio-protocol.rst:555
834839
msgid ""
835840
"However, :meth:`protocol.eof_received() <Protocol.eof_received>` is called "
836841
"at most once. Once `eof_received()` is called, ``data_received()`` is not "
837842
"called anymore."
838843
msgstr ""
844+
"但是,:meth:`protocol.eof_received() <Protocol.eof_received>` 最多只会被调用一次。 一旦 "
845+
"`eof_received()` 被调用,``data_received()`` 就不会再被调用。"
839846

840847
#: ../../library/asyncio-protocol.rst:561
841848
msgid ""
842849
"Called when the other end signals it won't send any more data (for example "
843850
"by calling :meth:`transport.write_eof() <WriteTransport.write_eof>`, if the "
844851
"other end also uses asyncio)."
845852
msgstr ""
853+
"当发出信号的另一端不再继续发送数据时(例如通过调用 :meth:`transport.write_eof() "
854+
"<WriteTransport.write_eof>`,如果另一端也使用 asyncio 的话)被调用。"
846855

847856
#: ../../library/asyncio-protocol.rst:566
848857
msgid ""
@@ -852,13 +861,15 @@ msgid ""
852861
"the default implementation returns ``None``, it implicitly closes the "
853862
"connection."
854863
msgstr ""
864+
"此方法可能返回假值 (包括 ``None``),在此情况下传输将会自行关闭。 相反地,如果此方法返回真值,将以所用的协议来确定是否要关闭传输。 "
865+
"由于默认实现是返回 ``None``,因此它会隐式地关闭连接。"
855866

856867
#: ../../library/asyncio-protocol.rst:572
857868
msgid ""
858869
"Some transports, including SSL, don't support half-closed connections, in "
859870
"which case returning true from this method will result in the connection "
860871
"being closed."
861-
msgstr ""
872+
msgstr "某些传输,包括 SSL 在内,并不支持半关闭的连接,在此情况下从该方法返回真值将导致连接被关闭。"
862873

863874
#: ../../library/asyncio-protocol.rst:577
864875
#: ../../library/asyncio-protocol.rst:635
@@ -873,7 +884,7 @@ msgstr "缓冲流协议"
873884
msgid ""
874885
"Buffered Protocols can be used with any event loop method that supports "
875886
"`Streaming Protocols`_."
876-
msgstr ""
887+
msgstr "带缓冲的协议可与任何支持 `流式协议`_ 的事件循环方法配合使用。"
877888

878889
#: ../../library/asyncio-protocol.rst:595
879890
msgid ""

reference/datamodel.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ msgstr ""
277277
msgid ""
278278
"The string representations of the numeric classes, computed by "
279279
":meth:`__repr__` and :meth:`__str__`, have the following properties:"
280-
msgstr "数字类的字符串表示形式,由 :meth:`__repr__` 和 :meth:`__str__` 算出,具有以下牲属性:"
280+
msgstr "数字类的字符串表示形式,由 :meth:`__repr__` 和 :meth:`__str__` 算出,具有以下属性:"
281281

282282
#: ../../reference/datamodel.rst:194
283283
msgid ""
@@ -1738,7 +1738,7 @@ msgid ""
17381738
"must explicitly call it to ensure proper deletion of the base class part of "
17391739
"the instance."
17401740
msgstr ""
1741-
"在实例将被销毁时调用。这还会调用终结器或析构器 (不适当)。如果一个基类具有 :meth:`__del__` 方法,则其所派生的类如果也有 "
1741+
"在实例将被销毁时调用。 这还被称为终结器或析构器(不适当)。 如果一个基类具有 :meth:`__del__` 方法,则其所派生的类如果也有 "
17421742
":meth:`__del__` 方法,就必须显式地调用它以确保实例基类部分的正确清除。"
17431743

17441744
#: ../../reference/datamodel.rst:1245

0 commit comments

Comments
 (0)