|
5 | 5 | # |
6 | 6 | # Translators: |
7 | 7 | # python-doc bot, 2025 |
| 8 | +# Freesand Leo <yuqinju@163.com>, 2025 |
8 | 9 | # |
9 | 10 | #, fuzzy |
10 | 11 | msgid "" |
11 | 12 | msgstr "" |
12 | 13 | "Project-Id-Version: Python 3.14\n" |
13 | 14 | "Report-Msgid-Bugs-To: \n" |
14 | | -"POT-Creation-Date: 2025-06-27 14:20+0000\n" |
| 15 | +"POT-Creation-Date: 2025-11-29 14:13+0000\n" |
15 | 16 | "PO-Revision-Date: 2025-09-16 00:01+0000\n" |
16 | | -"Last-Translator: python-doc bot, 2025\n" |
| 17 | +"Last-Translator: Freesand Leo <yuqinju@163.com>, 2025\n" |
17 | 18 | "Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n" |
18 | 19 | "MIME-Version: 1.0\n" |
19 | 20 | "Content-Type: text/plain; charset=UTF-8\n" |
@@ -109,30 +110,30 @@ msgstr "" |
109 | 110 | "import time\n" |
110 | 111 | "\n" |
111 | 112 | "def crawl(link, delay=3):\n" |
112 | | -"print(f\"crawl started for {link}\")\n" |
113 | | -"time.sleep(delay) # 阻塞 I/O (模拟网络请求)\n" |
114 | | -"print(f\"crawl ended for {link}\")\n" |
| 113 | +" print(f\"crawl started for {link}\")\n" |
| 114 | +" time.sleep(delay) # 阻塞 I/O (模拟网络请求)\n" |
| 115 | +" print(f\"crawl ended for {link}\")\n" |
115 | 116 | "\n" |
116 | 117 | "links = [\n" |
117 | | -"\"https://python.org\",\n" |
118 | | -"\"https://docs.python.org\",\n" |
119 | | -"\"https://peps.python.org\",\n" |
| 118 | +" \"https://python.org\",\n" |
| 119 | +" \"https://docs.python.org\",\n" |
| 120 | +" \"https://peps.python.org\",\n" |
120 | 121 | "]\n" |
121 | 122 | "\n" |
122 | 123 | "# 针对每个链接启动线程\n" |
123 | 124 | "threads = []\n" |
124 | 125 | "for link in links:\n" |
125 | | -"# 使用 `args` 传入位置参数并使用 `kwargs` 传入关键字参数\n" |
126 | | -"t = threading.Thread(target=crawl, args=(link,), kwargs={\"delay\": 2})\n" |
127 | | -"threads.append(t)\n" |
| 126 | +" # 使用 `args` 传入位置参数并使用 `kwargs` 传入关键字参数\n" |
| 127 | +" t = threading.Thread(target=crawl, args=(link,), kwargs={\"delay\": 2})\n" |
| 128 | +" threads.append(t)\n" |
128 | 129 | "\n" |
129 | 130 | "# 启动每个线程\n" |
130 | 131 | "for t in threads:\n" |
131 | | -"t.start()\n" |
| 132 | +" t.start()\n" |
132 | 133 | "\n" |
133 | 134 | "# 等待所有线程结束\n" |
134 | 135 | "for t in threads:\n" |
135 | | -"t.join()" |
| 136 | +" t.join()" |
136 | 137 |
|
137 | 138 | #: ../../library/threading.rst:60 |
138 | 139 | msgid "This module used to be optional, it is now always available." |
|
0 commit comments