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

Skip to content

Commit 13a2060

Browse files
[po] auto sync
1 parent 2d4e5ea commit 13a2060

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.20%", "updated_at": "2023-10-04T03:56:14Z"}
1+
{"translation": "91.22%", "updated_at": "2023-10-04T04:56:47Z"}

howto/urllib2.po

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ msgid ""
330330
"The :exc:`~urllib.error.HTTPError` instance raised will have an integer "
331331
"'code' attribute, which corresponds to the error sent by the server."
332332
msgstr ""
333+
"被引发的 :exc:`~urllib.error.HTTPError` 实例将有一个整数形式的 'code' 属性,对应于服务器发送的错误信息。"
333334

334335
#: ../../howto/urllib2.rst:241
335336
msgid "Error Codes"
@@ -360,6 +361,9 @@ msgid ""
360361
"attribute, it also has read, geturl, and info, methods as returned by the "
361362
"``urllib.response`` module::"
362363
msgstr ""
364+
"当错误被引发时服务器会通过返回 HTTP 错误码 *和* 错误页面进行响应。 你可以在返回的页面上使用 "
365+
":exc:`~urllib.error.HTTPError` 实例作为响应。 这意味着除了 code 属性之外,它还像 "
366+
"``urllib.response`` 模块: 所返回对象那样具有 read, geturl 和 info 等方法::"
363367

364368
#: ../../howto/urllib2.rst:339
365369
msgid "Wrapping it Up"
@@ -371,6 +375,8 @@ msgid ""
371375
":exc:`~urllib.error.URLError` there are two basic approaches. I prefer the "
372376
"second approach."
373377
msgstr ""
378+
"因此当你想为 :exc:`~urllib.error.HTTPError` *或* :exc:`~urllib.error.URLError` "
379+
"做好准备时有两种基本的方案。 我更倾向使用第二种方案。"
374380

375381
#: ../../howto/urllib2.rst:345
376382
msgid "Number 1"
@@ -381,6 +387,8 @@ msgid ""
381387
"The ``except HTTPError`` *must* come first, otherwise ``except URLError`` "
382388
"will *also* catch an :exc:`~urllib.error.HTTPError`."
383389
msgstr ""
390+
"``except HTTPError`` *必须* 首先被处理,否则 ``except URLError`` 将会 *同时* 捕获 "
391+
":exc:`~urllib.error.HTTPError`。"
384392

385393
#: ../../howto/urllib2.rst:371
386394
msgid "Number 2"
@@ -396,6 +404,8 @@ msgid ""
396404
"instance) has two useful methods :meth:`info` and :meth:`geturl` and is "
397405
"defined in the module :mod:`urllib.response`.."
398406
msgstr ""
407+
"urlopen 返回的响应 (或 :exc:`~urllib.error.HTTPError` 实例) 包含两个有用的方法 :meth:`info` 和"
408+
" :meth:`geturl` 并且是在模块 :mod:`urllib.response` 中定义的。"
399409

400410
#: ../../howto/urllib2.rst:398
401411
msgid ""

library/difflib.po

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,12 +783,14 @@ msgid ""
783783
":meth:`~SequenceMatcher.ratio` value over 0.6 means the sequences are close "
784784
"matches:"
785785
msgstr ""
786+
":meth:`~SequenceMatcher.ratio` 返回一个 [0, 1] 范围内的浮点数,用来衡量序列的相似度。 "
787+
"根据经验,:meth:`~SequenceMatcher.ratio` 值超过 0.6 就意味着两个序列非常接近匹配:"
786788

787789
#: ../../library/difflib.rst:603
788790
msgid ""
789791
"If you're only interested in where the sequences match, "
790792
":meth:`~SequenceMatcher.get_matching_blocks` is handy:"
791-
msgstr ""
793+
msgstr "如果您只对序列的匹配的位置感兴趣,则 :meth:`~SequenceMatcher.get_matching_blocks` 就很方便:"
792794

793795
#: ../../library/difflib.rst:612
794796
msgid ""
@@ -797,12 +799,14 @@ msgid ""
797799
"len(b), 0)``, and this is the only case in which the last tuple element "
798800
"(number of elements matched) is ``0``."
799801
msgstr ""
802+
"请注意 :meth:`~SequenceMatcher.get_matching_blocks` 返回的最后一个元组 ``(len(a), "
803+
"len(b), 0)`` 始终只用于占位,这也是元组的末尾元素(匹配的元素个数)为 ``0`` 的唯一情况。"
800804

801805
#: ../../library/difflib.rst:616
802806
msgid ""
803807
"If you want to know how to change the first sequence into the second, use "
804808
":meth:`~SequenceMatcher.get_opcodes`:"
805-
msgstr ""
809+
msgstr "如果你想要知道如何将第一个序列转成第二个序列,可以使用 :meth:`~SequenceMatcher.get_opcodes`:"
806810

807811
#: ../../library/difflib.rst:627
808812
msgid ""
@@ -908,6 +912,8 @@ msgid ""
908912
" be obtained from the :meth:`~io.IOBase.readlines` method of file-like "
909913
"objects):"
910914
msgstr ""
915+
"此示例比较两段文本。 首先我们设置文本为以换行符结尾的单行字符串组成的序列(这样的序列也可以通过文件类对象的 "
916+
":meth:`~io.IOBase.readlines` 方法来获取):"
911917

912918
#: ../../library/difflib.rst:709
913919
msgid "Next we instantiate a Differ object:"

0 commit comments

Comments
 (0)