55#
66# Translators:
77# ww song <[email protected] >, 20188- # SKY H. <[email protected] >, 201898# Pandaaaa906 <[email protected] >, 2019109# Josh Ouyang <[email protected] >, 20191110# Freesand Leo <[email protected] >, 2019@@ -15,7 +14,7 @@ msgid ""
1514msgstr ""
1615"Project-Id-Version : Python 3.8\n "
1716"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2020-01-01 12:19 +0000\n "
17+ "POT-Creation-Date : 2020-01-29 12:34 +0000\n "
1918"PO-Revision-Date : 2017-02-16 17:35+0000\n "
2019"
Last-Translator :
Freesand Leo <[email protected] >, 2019\n "
2120"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -84,24 +83,21 @@ msgstr "返回与 *p* 包含相同键值对的新字典。"
8483
8584#: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:65
8685msgid ""
87- "Insert *value * into the dictionary *p* with a key of *key*. *key* must be "
86+ "Insert *val * into the dictionary *p* with a key of *key*. *key* must be "
8887":term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0``"
89- " on success or ``-1`` on failure."
88+ " on success or ``-1`` on failure. This function *does not* steal a "
89+ "reference to *val*."
9090msgstr ""
91- "使用 *key* 作为键将 *value* 插入字典 *p* 。 *key* 必须为 :term:`hashable` ;如果不是,会抛出 "
92- ":exc:`TypeError` 异常。成功返回 ``0`` ,失败返回 ``-1`` 。"
9391
94- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:74
92+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:75
9593msgid ""
96- "Insert *value * into the dictionary *p* using *key* as a key. *key* should be"
97- " a :c:type:`const char\\ *`. The key object is created using "
94+ "Insert *val * into the dictionary *p* using *key* as a key. *key* should be a "
95+ " :c:type:`const char\\ *`. The key object is created using "
9896"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on "
99- "failure."
97+ "failure. This function *does not* steal a reference to *val*. "
10098msgstr ""
101- "使用 *key* 作为键将 *value* 插入到字典 *p* 中。*key* 必须为 :c:type:`const char\\ *`。键对象是由 "
102- "``PyUnicode_FromString(key)`` 创建的。成功时返回 ``0``,失败时返回 ``-1``。"
10399
104- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:82
100+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:83
105101msgid ""
106102"Remove the entry in dictionary *p* with key *key*. *key* must be hashable; "
107103"if it isn't, :exc:`TypeError` is raised. Return ``0`` on success or ``-1`` "
@@ -110,20 +106,20 @@ msgstr ""
110106"使用键 *key* 删除字典 *p* 中的条目。 *key* 必须是可哈希的;如果不是,则抛出 :exc:`TypeError` 异常。成功时返回 "
111107"``0`` ,失败时返回 ``-1`` 。"
112108
113- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:89
109+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:90
114110msgid ""
115111"Remove the entry in dictionary *p* which has a key specified by the string "
116112"*key*. Return ``0`` on success or ``-1`` on failure."
117113msgstr "删除字典 *p* 中的条目,其中包含由字符串 *key* 指定的键。成功时返回“0,失败时返回“-1”。"
118114
119- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:95
115+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:96
120116msgid ""
121117"Return the object from dictionary *p* which has a key *key*. Return "
122118"``NULL`` if the key *key* is not present, but *without* setting an "
123119"exception."
124120msgstr "从字典 *p* 中返回以 *key* 为键的对象。 如果键名 *key* 不存在但 *没有* 设置一个异常则返回 ``NULL``。"
125121
126- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:98
122+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:99
127123msgid ""
128124"Note that exceptions which occur while calling :meth:`__hash__` and "
129125":meth:`__eq__` methods will get suppressed. To get error reporting use "
@@ -132,7 +128,7 @@ msgstr ""
132128"需要注意的是,调用 :meth:`__hash__` 和 :meth:`__eq__` 方法产生的异常不会被抛出。改用 "
133129":c:func:`PyDict_GetItemWithError()` 获得错误报告。"
134130
135- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:105
131+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:106
136132msgid ""
137133"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
138134"Return ``NULL`` **with** an exception set if an exception occurred. Return "
@@ -141,15 +137,15 @@ msgstr ""
141137":c:func:`PyDict_GetItem` 的变种,它不会屏蔽异常。 当异常发生时将返回 ``NULL`` **并且** 设置一个异常。 "
142138"如果键不存在则返回 ``NULL`` **并且不会** 设置一个异常。"
143139
144- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:113
140+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:114
145141msgid ""
146142"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a "
147143":c:type:`const char\\ *`, rather than a :c:type:`PyObject\\ *`."
148144msgstr ""
149145"这与 :c:func:`PyDict_GetItem` 一样,但是 *key* 需要指定一个 :c:type:`const char\\ *` ,而不是 "
150146":c:type:`PyObject\\ *` 。"
151147
152- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:116
148+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:117
153149msgid ""
154150"Note that exceptions which occur while calling :meth:`__hash__` and "
155151":meth:`__eq__` methods and creating a temporary string object will get "
@@ -159,7 +155,7 @@ msgstr ""
159155"需要注意的是,调用 :meth:`__hash__` 、 :meth:`__eq__` 方法和创建一个临时的字符串对象时产生的异常不会被抛出。改用 "
160156":c:func:`PyDict_GetItemWithError()` 获得错误报告。"
161157
162- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:124
158+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:125
163159msgid ""
164160"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
165161"it returns the value corresponding to *key* from the dictionary *p*. If the"
@@ -172,30 +168,30 @@ msgstr ""
172168"里面对应的值。如果键不存在,它会和值 *defaultobj* 一起插入并返回 *defaultobj* 。这个函数只计算 *key* "
173169"的哈希函数一次,而不是在查找和插入时分别计算它。"
174170
175- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:134
171+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:135
176172msgid ""
177173"Return a :c:type:`PyListObject` containing all the items from the "
178174"dictionary."
179175msgstr "返回一个包含字典中所有键值项的 :c:type:`PyListObject`。"
180176
181- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:139
177+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:140
182178msgid ""
183179"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
184180msgstr "返回一个包含字典中所有键(keys)的 :c:type:`PyListObject`。"
185181
186- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:144
182+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:145
187183msgid ""
188184"Return a :c:type:`PyListObject` containing all the values from the "
189185"dictionary *p*."
190186msgstr "返回一个包含字典中所有值(values)的 :c:type:`PyListObject`。"
191187
192- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:152
188+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:153
193189msgid ""
194190"Return the number of items in the dictionary. This is equivalent to "
195191"``len(p)`` on a dictionary."
196192msgstr "返回字典中项目数,等价于对字典 *p* 使用 ``len(p)``。"
197193
198- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:158
194+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:159
199195msgid ""
200196"Iterate over all key-value pairs in the dictionary *p*. The "
201197":c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` "
@@ -213,18 +209,18 @@ msgstr ""
213209":c:type:`PyObject\\ *` 变量,它们将分别使用每个键和值来填充,或者也可以为 ``NULL``。 通过它们返回的任何引用都是暂借的。 "
214210"*ppos* 在迭代期间不应被更改。 它的值表示内部字典结构中的偏移量,并且由于结构是稀疏的,因此偏移量并不连续。"
215211
216- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:169
212+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:170
217213msgid "For example::"
218214msgstr "例如::"
219215
220- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:179
216+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:180
221217msgid ""
222218"The dictionary *p* should not be mutated during iteration. It is safe to "
223219"modify the values of the keys as you iterate over the dictionary, but only "
224220"so long as the set of keys does not change. For example::"
225221msgstr "字典 *p* 不应该在遍历期间发生改变。在遍历字典时,改变键中的值是安全的,但仅限于键的集合不发生改变。例如::"
226222
227- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:204
223+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:205
228224msgid ""
229225"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
230226"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -237,7 +233,7 @@ msgstr ""
237233":c:func:`PyObject_GetItem` 的对象。 如果 *override* 为真值,则如果在 *b* 中找到相同的键则 *a* "
238234"中已存在的相应键值对将被替换,否则如果在 *a* 中没有相同的键则只是添加键值对。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。"
239235
240- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:214
236+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:215
241237msgid ""
242238"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to "
243239"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall "
@@ -249,7 +245,7 @@ msgstr ""
249245":c:func:`PyDict_Update` 在第二个参数没有 \" keys\" 属性时不会回退到迭代键值对的序列。 当成功时返回 ``0`` "
250246"或者当引发异常时返回 ``-1``。"
251247
252- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:223
248+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:224
253249msgid ""
254250"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
255251"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -262,6 +258,6 @@ msgstr ""
262258"*override* 真值则最后出现的键胜出。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。 等价的 Python "
263259"代码(返回值除外)::"
264260
265- #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:238
261+ #: /home/travis/build/python/cpython-doc-catalog/Doc/c-api/dict.rst:239
266262msgid "Clear the free list. Return the total number of freed items."
267263msgstr "清空释放列表。 返回所释放的条目数。"
0 commit comments