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

Skip to content

Commit 832e685

Browse files
committed
[po] auto sync bot
1 parent 09a84fc commit 832e685

3 files changed

Lines changed: 35 additions & 17 deletions

File tree

library/_thread.po

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ msgstr ""
132132

133133
#: ../../library/_thread.rst:116
134134
msgid "Lock objects have the following methods:"
135-
msgstr ""
135+
msgstr "锁对象有以下方法:"
136136

137137
#: ../../library/_thread.rst:121
138138
msgid ""
139139
"Without any optional argument, this method acquires the lock "
140140
"unconditionally, if necessary waiting until it is released by another thread"
141141
" (only one thread at a time can acquire a lock --- that's their reason for "
142142
"existence)."
143-
msgstr ""
143+
msgstr "没有任何可选参数时,该方法无条件申请获得锁,有必要的话会等待其他线程释放锁(同时只有一个线程能获得锁 —— 这正是锁存在的原因)。"
144144

145145
#: ../../library/_thread.rst:125
146146
msgid ""
@@ -149,6 +149,8 @@ msgid ""
149149
"immediately without waiting, while if it is nonzero, the lock is acquired "
150150
"unconditionally as above."
151151
msgstr ""
152+
"如果传入了整型参数 *waitflag*,具体的行为取决于传入的值:如果是 0 "
153+
"的话,只会在能够立刻获取到锁时才获取,不会等待,如果是非零的话,会像之前提到的一样,无条件获取锁。"
152154

153155
#: ../../library/_thread.rst:130
154156
msgid ""
@@ -157,73 +159,82 @@ msgid ""
157159
"*timeout* argument specifies an unbounded wait. You cannot specify a "
158160
"*timeout* if *waitflag* is zero."
159161
msgstr ""
162+
"如果传入正浮点数参数 *timeout*,相当于指定了返回之前等待得最大秒数。如果传入负的 *timeout*,相当于无限期等待。如果 "
163+
"*waitflag* 是 0 的话,不能指定 *timeout*。"
160164

161165
#: ../../library/_thread.rst:135
162166
msgid ""
163167
"The return value is ``True`` if the lock is acquired successfully, ``False``"
164168
" if not."
165-
msgstr ""
169+
msgstr "如果成功获取到所会返回 ``True``,否则返回 ``False``。"
166170

167171
#: ../../library/_thread.rst:138
168172
msgid "The *timeout* parameter is new."
169-
msgstr ""
173+
msgstr "新的 *timeout` 参数。"
170174

171175
#: ../../library/_thread.rst:141
172176
msgid "Lock acquires can now be interrupted by signals on POSIX."
173-
msgstr ""
177+
msgstr "现在获取锁的操作可以被 POSIX 信号中断。"
174178

175179
#: ../../library/_thread.rst:147
176180
msgid ""
177181
"Releases the lock. The lock must have been acquired earlier, but not "
178182
"necessarily by the same thread."
179-
msgstr ""
183+
msgstr "释放锁。锁必须已经被获取过,但不一定是同一个线程获取的。"
180184

181185
#: ../../library/_thread.rst:153
182186
msgid ""
183187
"Return the status of the lock: ``True`` if it has been acquired by some "
184188
"thread, ``False`` if not."
185-
msgstr ""
189+
msgstr "返回锁的状态:如果已被某个线程获取,返回 ``True``,否则返回 ``False``。"
186190

187191
#: ../../library/_thread.rst:156
188192
msgid ""
189193
"In addition to these methods, lock objects can also be used via the "
190194
":keyword:`with` statement, e.g.::"
191-
msgstr ""
195+
msgstr "除了这些方法之外,锁对象也可以通过 :keyword:`with` 语句使用,例如:"
192196

193197
#: ../../library/_thread.rst:166
194198
msgid "**Caveats:**"
195-
msgstr ""
199+
msgstr "**注意事项:**"
196200

197201
#: ../../library/_thread.rst:170
198202
msgid ""
199203
"Threads interact strangely with interrupts: the :exc:`KeyboardInterrupt` "
200204
"exception will be received by an arbitrary thread. (When the :mod:`signal` "
201205
"module is available, interrupts always go to the main thread.)"
202206
msgstr ""
207+
"线程与中断奇怪地交互::exc:`KeyboardInterrupt` 异常可能会被任意一个线程捕获。(如果 :mod:`signal` "
208+
"模块可用的话,中断总是会进入主线程。)"
203209

204210
#: ../../library/_thread.rst:174
205211
msgid ""
206212
"Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is "
207213
"equivalent to calling :func:`_thread.exit`."
208214
msgstr ""
215+
"调用 :func:`sys.exit` 或是抛出 :exc:`SystemExit` 异常等效于调用 :func:`_thread.exit`。"
209216

210217
#: ../../library/_thread.rst:177
211218
msgid ""
212219
"It is not possible to interrupt the :meth:`acquire` method on a lock --- the"
213220
" :exc:`KeyboardInterrupt` exception will happen after the lock has been "
214221
"acquired."
215-
msgstr ""
222+
msgstr "不可能中断锁的 :meth:`acquire` 方法 —— :exc:`KeyboardInterrupt` 一场会在锁获取到之后发生。"
216223

217224
#: ../../library/_thread.rst:180
218225
msgid ""
219226
"When the main thread exits, it is system defined whether the other threads "
220227
"survive. On most systems, they are killed without executing :keyword:`try` "
221228
"... :keyword:`finally` clauses or executing object destructors."
222229
msgstr ""
230+
"当主线程退出时,由系统决定其他线程是否存活。在大多数系统中,这些线程会直接被杀掉,不会执行 :keyword:`try` ... "
231+
":keyword:`finally` 语句,也不会执行对象析构函数。"
223232

224233
#: ../../library/_thread.rst:185
225234
msgid ""
226235
"When the main thread exits, it does not do any of its usual cleanup (except "
227236
"that :keyword:`try` ... :keyword:`finally` clauses are honored), and the "
228237
"standard I/O files are not flushed."
229238
msgstr ""
239+
"当主线程退出时,不会进行正常的清理工作(除非使用了 :keyword:`try` ... :keyword:`finally` 语句),标准 I/O "
240+
"文件也不会刷新。"

library/threading.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,11 @@ msgstr ""
537537
#: ../../library/threading.rst:399 ../../library/threading.rst:477
538538
#: ../../library/threading.rst:722
539539
msgid "The *timeout* parameter is new."
540-
msgstr ""
540+
msgstr "新的 *timeout` 参数。"
541541

542542
#: ../../library/threading.rst:402
543543
msgid "Lock acquires can now be interrupted by signals on POSIX."
544-
msgstr ""
544+
msgstr "现在获取锁的操作可以被 POSIX 信号中断。"
545545

546546
#: ../../library/threading.rst:408
547547
msgid ""

tutorial/interactive.po

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgstr ""
2020

2121
#: ../../tutorial/interactive.rst:5
2222
msgid "Interactive Input Editing and History Substitution"
23-
msgstr "交互式输入编辑和输入历史"
23+
msgstr "交互式编辑和编辑历史"
2424

2525
#: ../../tutorial/interactive.rst:7
2626
msgid ""
@@ -30,12 +30,12 @@ msgid ""
3030
" library, which supports various styles of editing. This library has its "
3131
"own documentation which we won't duplicate here."
3232
msgstr ""
33-
"某些版本的 Python 解释器支持编辑当前输入行和历史记录,类似 Korn shell 和 GNU Bash shell 的功能 。这个功能使用了 "
34-
"`GNU Readline`_ 来实现,一个支持多种编辑方式的库。这个库有它自己的文档,在这里我们就不重复说明了。"
33+
"某些版本的 Python 解释器支持编辑当前输入行和编辑历史记录,类似 Korn shell 和 GNU Bash shell 的功能 。这个功能使用了"
34+
" `GNU Readline`_ 来实现,一个支持多种编辑方式的库。这个库有它自己的文档,在这里我们就不重复说明了。"
3535

3636
#: ../../tutorial/interactive.rst:17
3737
msgid "Tab Completion and History Editing"
38-
msgstr "Tab 补全和历史编辑"
38+
msgstr "Tab 补全和编辑历史"
3939

4040
#: ../../tutorial/interactive.rst:19
4141
msgid ""
@@ -51,10 +51,15 @@ msgid ""
5151
":file:`.python_history` in your user directory. The history will be "
5252
"available again during the next interactive interpreter session."
5353
msgstr ""
54+
"在解释器启动的时候,补全变量和模块名的功能将 :ref:`自动打开`<rlcompleter-config>,以便在按下 :kbd:`Tab` "
55+
"键的时候调用补全函数。它会查看 Python 语句名称,当前局部变量和可用的模块名称。处理像 ``string.a`` 的表达时,它会求值在最后一个 "
56+
"``'.'`` 之前的表达式,接着根据求值结果对象的属性给出补全建议。如果拥有 :meth:`__getattr__` "
57+
"方法的对象是表达式的一部分,注意这可能会执行程序定义的代码。默认配置下会把编辑历史记录保存在用户目录下名为 "
58+
":file:`.python_history` 的文件。在下一次 Python 解释器会话期间,编辑历史记录仍旧可用。"
5459

5560
#: ../../tutorial/interactive.rst:36
5661
msgid "Alternatives to the Interactive Interpreter"
57-
msgstr ""
62+
msgstr "默认交互式解释器的替代品"
5863

5964
#: ../../tutorial/interactive.rst:38
6065
msgid ""
@@ -74,3 +79,5 @@ msgid ""
7479
"customized and embedded into other applications. Another similar enhanced "
7580
"interactive environment is bpython_."
7681
msgstr ""
82+
"一个可选的增强型交互式解释器是 IPython_,它已经存在了有一段时间,它具有 tab "
83+
"补全,探索对象和高级历史记录管理功能。它还可以彻底定制并嵌入到其他应用程序中。另一个相似的增强型交互式环境是 bpython_。"

0 commit comments

Comments
 (0)