44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Meng Du <[email protected] >, 201887# cissoid <[email protected] >, 201898# Freesand Leo <[email protected] >, 20199+ # Meng Du <[email protected] >, 20191010#
1111#, fuzzy
1212msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.7\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2019-01-01 10:14 +0900\n "
16+ "POT-Creation-Date : 2019-05-25 11:30 +0900\n "
1717"PO-Revision-Date : 2017-02-16 17:47+0000\n "
18- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2019\n "
18+ "Last-Translator : Meng Du <alphanow@gmail .com>, 2019\n "
1919"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2020"MIME-Version : 1.0\n "
2121"Content-Type : text/plain; charset=UTF-8\n "
@@ -74,23 +74,30 @@ msgstr ""
7474
7575#: ../../library/_thread.rst:56
7676msgid ""
77- "Raise a :exc:`KeyboardInterrupt` exception in the main thread. A subthread "
78- "can use this function to interrupt the main thread."
79- msgstr "在主线程中抛出 :exc:`KeyboardInterrupt` 异常。子线程可以使用这个函数来中断主线程。 "
77+ "Simulate the effect of a :data:`signal.SIGINT` signal arriving in the main "
78+ "thread. A thread can use this function to interrupt the main thread."
79+ msgstr ""
8080
81- #: ../../library/_thread.rst:62
81+ #: ../../library/_thread.rst:59
82+ msgid ""
83+ "If :data:`signal.SIGINT` isn't handled by Python (it was set to "
84+ ":data:`signal.SIG_DFL` or :data:`signal.SIG_IGN`), this function does "
85+ "nothing."
86+ msgstr ""
87+
88+ #: ../../library/_thread.rst:66
8289msgid ""
8390"Raise the :exc:`SystemExit` exception. When not caught, this will cause the"
8491" thread to exit silently."
8592msgstr "抛出 :exc:`SystemExit` 异常。如果没有捕获的话,这个异常会使线程退出。"
8693
87- #: ../../library/_thread.rst:76
94+ #: ../../library/_thread.rst:80
8895msgid ""
8996"Return a new lock object. Methods of locks are described below. The lock "
9097"is initially unlocked."
9198msgstr "返回一个新的锁对象。锁中的方法在后面描述。初始情况下锁处于解锁状态。"
9299
93- #: ../../library/_thread.rst:82
100+ #: ../../library/_thread.rst:86
94101msgid ""
95102"Return the 'thread identifier' of the current thread. This is a nonzero "
96103"integer. Its value has no direct meaning; it is intended as a magic cookie "
@@ -101,7 +108,7 @@ msgstr ""
101108"返回当前线程的 “线程描述符”。它是一个非零的整型数。它的值没有什么含义,主要是作为 magic cookie "
102109"使用,比如作为含有线程相关数据的字典的索引。线程描述符可能会在线程退出,新线程创建时复用。"
103110
104- #: ../../library/_thread.rst:90
111+ #: ../../library/_thread.rst:94
105112msgid ""
106113"Return the thread stack size used when creating new threads. The optional "
107114"*size* argument specifies the stack size to be used for subsequently created"
@@ -125,12 +132,12 @@ msgstr ""
125132"错误并且不会修改堆栈大小。32KiB是当前最小的能保证解释器足够堆栈空间的堆栈大小。需要注意的是部分平台对于堆栈大小会有特定的限制,例如要求大于32KiB的堆栈大小或者需要根据系统内存页面的整数倍进行分配"
126133" - 应当查阅平台文档有关详细信息(4KiB页面比较普遍,在没有更具体信息的情况下,建议的方法是使用4096的倍数作为堆栈大小)"
127134
128- #: ../../library/_thread.rst:105
135+ #: ../../library/_thread.rst:109
129136msgid ""
130137":ref:`Availability <availability>`: Windows, systems with POSIX threads."
131138msgstr ":ref:`可用性 <availability>`: Windows,具有 POSIX 线程的系统。"
132139
133- #: ../../library/_thread.rst:110
140+ #: ../../library/_thread.rst:114
134141msgid ""
135142"The maximum value allowed for the *timeout* parameter of "
136143":meth:`Lock.acquire`. Specifying a timeout greater than this value will "
@@ -139,19 +146,19 @@ msgstr ""
139146":meth:`Lock.acquire` 方法中 *timeout* 参数允许的最大值。传入超过这个值的 timeout 会抛出 "
140147":exc:`OverflowError` 异常。"
141148
142- #: ../../library/_thread.rst:117
149+ #: ../../library/_thread.rst:121
143150msgid "Lock objects have the following methods:"
144151msgstr "锁对象有以下方法:"
145152
146- #: ../../library/_thread.rst:122
153+ #: ../../library/_thread.rst:126
147154msgid ""
148155"Without any optional argument, this method acquires the lock "
149156"unconditionally, if necessary waiting until it is released by another thread"
150157" (only one thread at a time can acquire a lock --- that's their reason for "
151158"existence)."
152159msgstr "没有任何可选参数时,该方法无条件申请获得锁,有必要的话会等待其他线程释放锁(同时只有一个线程能获得锁 —— 这正是锁存在的原因)。"
153160
154- #: ../../library/_thread.rst:126
161+ #: ../../library/_thread.rst:130
155162msgid ""
156163"If the integer *waitflag* argument is present, the action depends on its "
157164"value: if it is zero, the lock is only acquired if it can be acquired "
@@ -161,7 +168,7 @@ msgstr ""
161168"如果传入了整型参数 *waitflag*,具体的行为取决于传入的值:如果是 0 "
162169"的话,只会在能够立刻获取到锁时才获取,不会等待,如果是非零的话,会像之前提到的一样,无条件获取锁。"
163170
164- #: ../../library/_thread.rst:131
171+ #: ../../library/_thread.rst:135
165172msgid ""
166173"If the floating-point *timeout* argument is present and positive, it "
167174"specifies the maximum wait time in seconds before returning. A negative "
@@ -171,43 +178,43 @@ msgstr ""
171178"如果传入正浮点数参数 *timeout*,相当于指定了返回之前等待得最大秒数。如果传入负的 *timeout*,相当于无限期等待。如果 "
172179"*waitflag* 是 0 的话,不能指定 *timeout*。"
173180
174- #: ../../library/_thread.rst:136
181+ #: ../../library/_thread.rst:140
175182msgid ""
176183"The return value is ``True`` if the lock is acquired successfully, ``False``"
177184" if not."
178185msgstr "如果成功获取到所会返回 ``True``,否则返回 ``False``。"
179186
180- #: ../../library/_thread.rst:139
187+ #: ../../library/_thread.rst:143
181188msgid "The *timeout* parameter is new."
182189msgstr "*timeout* 形参是新增的。"
183190
184- #: ../../library/_thread.rst:142
191+ #: ../../library/_thread.rst:146
185192msgid "Lock acquires can now be interrupted by signals on POSIX."
186193msgstr "现在获取锁的操作可以被 POSIX 信号中断。"
187194
188- #: ../../library/_thread.rst:148
195+ #: ../../library/_thread.rst:152
189196msgid ""
190197"Releases the lock. The lock must have been acquired earlier, but not "
191198"necessarily by the same thread."
192199msgstr "释放锁。锁必须已经被获取过,但不一定是同一个线程获取的。"
193200
194- #: ../../library/_thread.rst:154
201+ #: ../../library/_thread.rst:158
195202msgid ""
196203"Return the status of the lock: ``True`` if it has been acquired by some "
197204"thread, ``False`` if not."
198205msgstr "返回锁的状态:如果已被某个线程获取,返回 ``True``,否则返回 ``False``。"
199206
200- #: ../../library/_thread.rst:157
207+ #: ../../library/_thread.rst:161
201208msgid ""
202209"In addition to these methods, lock objects can also be used via the "
203210":keyword:`with` statement, e.g.::"
204211msgstr "除了这些方法之外,锁对象也可以通过 :keyword:`with` 语句使用,例如:"
205212
206- #: ../../library/_thread.rst:167
213+ #: ../../library/_thread.rst:171
207214msgid "**Caveats:**"
208215msgstr "**注意事项:**"
209216
210- #: ../../library/_thread.rst:171
217+ #: ../../library/_thread.rst:175
211218msgid ""
212219"Threads interact strangely with interrupts: the :exc:`KeyboardInterrupt` "
213220"exception will be received by an arbitrary thread. (When the :mod:`signal` "
@@ -216,21 +223,21 @@ msgstr ""
216223"线程与中断奇怪地交互::exc:`KeyboardInterrupt` 异常可能会被任意一个线程捕获。(如果 :mod:`signal` "
217224"模块可用的话,中断总是会进入主线程。)"
218225
219- #: ../../library/_thread.rst:175
226+ #: ../../library/_thread.rst:179
220227msgid ""
221228"Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is "
222229"equivalent to calling :func:`_thread.exit`."
223230msgstr ""
224231"调用 :func:`sys.exit` 或是抛出 :exc:`SystemExit` 异常等效于调用 :func:`_thread.exit`。"
225232
226- #: ../../library/_thread.rst:178
233+ #: ../../library/_thread.rst:182
227234msgid ""
228235"It is not possible to interrupt the :meth:`acquire` method on a lock --- the"
229236" :exc:`KeyboardInterrupt` exception will happen after the lock has been "
230237"acquired."
231238msgstr "不可能中断锁的 :meth:`acquire` 方法 —— :exc:`KeyboardInterrupt` 一场会在锁获取到之后发生。"
232239
233- #: ../../library/_thread.rst:181
240+ #: ../../library/_thread.rst:185
234241msgid ""
235242"When the main thread exits, it is system defined whether the other threads "
236243"survive. On most systems, they are killed without executing :keyword:`try` "
@@ -239,7 +246,7 @@ msgstr ""
239246"当主线程退出时,由系统决定其他线程是否存活。在大多数系统中,这些线程会直接被杀掉,不会执行 :keyword:`try` ... "
240247":keyword:`finally` 语句,也不会执行对象析构函数。"
241248
242- #: ../../library/_thread.rst:186
249+ #: ../../library/_thread.rst:190
243250msgid ""
244251"When the main thread exits, it does not do any of its usual cleanup (except "
245252"that :keyword:`try` ... :keyword:`finally` clauses are honored), and the "
0 commit comments