- Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathstdlib.po
324 lines (279 loc) · 14.5 KB
/
stdlib.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2023, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <rffontenelle@gmail.com>, 2022
#
#,fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-14 15:16+0000\n"
"PO-Revision-Date: 2022-11-05 17:23+0000\n"
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2022\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#:../../tutorial/stdlib.rst:5
msgid"Brief Tour of the Standard Library"
msgstr"标准库简介"
#:../../tutorial/stdlib.rst:11
msgid"Operating System Interface"
msgstr"操作系统接口"
#:../../tutorial/stdlib.rst:13
msgid""
"The :mod:`os` module provides dozens of functions for interacting with the "
"operating system::"
msgstr":mod:`os` 模块提供了许多与操作系统交互的函数::"
#:../../tutorial/stdlib.rst:23
msgid""
"Be sure to use the ``import os`` style instead of ``from os import *``. "
"This will keep :func:`os.open` from shadowing the built-in :func:`open` "
"function which operates much differently."
msgstr""
"一定要使用 ``import os`` 而不是 ``from os import *`` 。这将避免内建的 :func:`open` 函数被 "
":func:`os.open` 隐式替换掉,因为它们的使用方式大不相同。"
#:../../tutorial/stdlib.rst:29
msgid""
"The built-in :func:`dir` and :func:`help` functions are useful as "
"interactive aids for working with large modules like :mod:`os`::"
msgstr"内置的 :func:`dir` 和 :func:`help` 函数可用作交互式辅助工具,用于处理大型模块,如 :mod:`os`::"
#:../../tutorial/stdlib.rst:38
msgid""
"For daily file and directory management tasks, the :mod:`shutil` module "
"provides a higher level interface that is easier to use::"
msgstr"对于日常文件和目录管理任务, :mod:`shutil` 模块提供了更易于使用的更高级别的接口::"
#:../../tutorial/stdlib.rst:51
msgid"File Wildcards"
msgstr"文件通配符"
#:../../tutorial/stdlib.rst:53
msgid""
"The :mod:`glob` module provides a function for making file lists from "
"directory wildcard searches::"
msgstr":mod:`glob` 模块提供了一个在目录中使用通配符搜索创建文件列表的函数::"
#:../../tutorial/stdlib.rst:64
msgid"Command Line Arguments"
msgstr"命令行参数"
#:../../tutorial/stdlib.rst:66
msgid""
"Common utility scripts often need to process command line arguments. These "
"arguments are stored in the :mod:`sys` module's *argv* attribute as a list."
" For instance the following output results from running ``python demo.py "
"one two three`` at the command line::"
msgstr""
"通用实用程序脚本通常需要处理命令行参数。这些参数作为列表存储在 :mod:`sys` 模块的 *argv* 属性中。例如,以下输出来自在命令行运行 "
"``python demo.py one two three`` ::"
#:../../tutorial/stdlib.rst:75
msgid""
"The :mod:`argparse` module provides a more sophisticated mechanism to "
"process command line arguments. The following script extracts one or more "
"filenames and an optional number of lines to be displayed::"
msgstr":mod:`argparse` 模块提供了一种更复杂的机制来处理命令行参数。 以下脚本可提取一个或多个文件名,并可选择要显示的行数::"
#:../../tutorial/stdlib.rst:89
msgid""
"When run at the command line with ``python top.py --lines=5 alpha.txt "
"beta.txt``, the script sets ``args.lines`` to ``5`` and ``args.filenames`` "
"to ``['alpha.txt', 'beta.txt']``."
msgstr""
"当在通过 ``python top.py --lines=5 alpha.txt beta.txt`` 在命令行运行时,该脚本会将 "
"``args.lines`` 设为 ``5`` 并将 ``args.filenames`` 设为 ``['alpha.txt', "
"'beta.txt']``。"
#:../../tutorial/stdlib.rst:97
msgid"Error Output Redirection and Program Termination"
msgstr"错误输出重定向和程序终止"
#:../../tutorial/stdlib.rst:99
msgid""
"The :mod:`sys` module also has attributes for *stdin*, *stdout*, and "
"*stderr*. The latter is useful for emitting warnings and error messages to "
"make them visible even when *stdout* has been redirected::"
msgstr""
":mod:`sys` 模块还具有 *stdin* , *stdout* 和 *stderr* 的属性。后者对于发出警告和错误消息非常有用,即使在 "
"*stdout* 被重定向后也可以看到它们::"
#:../../tutorial/stdlib.rst:106
msgid"The most direct way to terminate a script is to use ``sys.exit()``."
msgstr"终止脚本的最直接方法是使用 ``sys.exit()`` 。"
#:../../tutorial/stdlib.rst:112
msgid"String Pattern Matching"
msgstr"字符串模式匹配"
#:../../tutorial/stdlib.rst:114
msgid""
"The :mod:`re` module provides regular expression tools for advanced string "
"processing. For complex matching and manipulation, regular expressions offer"
" succinct, optimized solutions::"
msgstr":mod:`re` 模块为高级字符串处理提供正则表达式工具。对于复杂的匹配和操作,正则表达式提供简洁,优化的解决方案::"
#:../../tutorial/stdlib.rst:124
msgid""
"When only simple capabilities are needed, string methods are preferred "
"because they are easier to read and debug::"
msgstr"当只需要简单的功能时,首选字符串方法因为它们更容易阅读和调试::"
#:../../tutorial/stdlib.rst:134
msgid"Mathematics"
msgstr"数学"
#:../../tutorial/stdlib.rst:136
msgid""
"The :mod:`math` module gives access to the underlying C library functions "
"for floating point math::"
msgstr":mod:`math` 模块提供对浮点数学的底层C库函数的访问::"
#:../../tutorial/stdlib.rst:145
msgid"The :mod:`random` module provides tools for making random selections::"
msgstr":mod:`random` 模块提供了进行随机选择的工具::"
#:../../tutorial/stdlib.rst:157
msgid""
"The :mod:`statistics` module calculates basic statistical properties (the "
"mean, median, variance, etc.) of numeric data::"
msgstr":mod:`statistics` 模块计算数值数据的基本统计属性(均值,中位数,方差等)::"
#:../../tutorial/stdlib.rst:169
msgid""
"The SciPy project <https://scipy.org> has many other modules for numerical "
"computations."
msgstr"SciPy项目 <https://scipy.org> 有许多其他模块用于数值计算。"
#:../../tutorial/stdlib.rst:175
msgid"Internet Access"
msgstr"互联网访问"
#:../../tutorial/stdlib.rst:177
msgid""
"There are a number of modules for accessing the internet and processing "
"internet protocols. Two of the simplest are :mod:`urllib.request` for "
"retrieving data from URLs and :mod:`smtplib` for sending mail::"
msgstr""
"有许多模块可用于访问互联网和处理互联网协议。其中两个最简单的 :mod:`urllib.request` 用于从URL检索数据,以及 "
":mod:`smtplib` 用于发送邮件::"
#:../../tutorial/stdlib.rst:200
msgid""
"(Note that the second example needs a mailserver running on localhost.)"
msgstr"(请注意,第二个示例需要在localhost上运行的邮件服务器。)"
#:../../tutorial/stdlib.rst:206
msgid"Dates and Times"
msgstr"日期和时间"
#:../../tutorial/stdlib.rst:208
msgid""
"The :mod:`datetime` module supplies classes for manipulating dates and times"
" in both simple and complex ways. While date and time arithmetic is "
"supported, the focus of the implementation is on efficient member extraction"
" for output formatting and manipulation. The module also supports objects "
"that are timezone aware. ::"
msgstr""
":mod:`datetime` "
"模块提供了以简单和复杂的方式操作日期和时间的类。虽然支持日期和时间算法,但实现的重点是有效的成员提取以进行输出格式化和操作。该模块还支持可感知时区的对象。"
" ::"
#:../../tutorial/stdlib.rst:232
msgid"Data Compression"
msgstr"数据压缩"
#:../../tutorial/stdlib.rst:234
msgid""
"Common data archiving and compression formats are directly supported by "
"modules including: :mod:`zlib`, :mod:`gzip`, :mod:`bz2`, :mod:`lzma`, "
":mod:`zipfile` and :mod:`tarfile`. ::"
msgstr""
"常见的数据存档和压缩格式由模块直接支持,包括::mod:`zlib`, :mod:`gzip`, :mod:`bz2`, :mod:`lzma`, "
":mod:`zipfile` 和 :mod:`tarfile`。::"
#:../../tutorial/stdlib.rst:254
msgid"Performance Measurement"
msgstr"性能测量"
#:../../tutorial/stdlib.rst:256
msgid""
"Some Python users develop a deep interest in knowing the relative "
"performance of different approaches to the same problem. Python provides a "
"measurement tool that answers those questions immediately."
msgstr"一些Python用户对了解同一问题的不同方法的相对性能产生了浓厚的兴趣。 Python提供了一种可以立即回答这些问题的测量工具。"
#:../../tutorial/stdlib.rst:260
msgid""
"For example, it may be tempting to use the tuple packing and unpacking "
"feature instead of the traditional approach to swapping arguments. The "
":mod:`timeit` module quickly demonstrates a modest performance advantage::"
msgstr"例如,元组封包和拆包功能相比传统的交换参数可能更具吸引力。:mod:`timeit` 模块可以快速演示在运行效率方面一定的优势::"
#:../../tutorial/stdlib.rst:270
msgid""
"In contrast to :mod:`timeit`'s fine level of granularity, the :mod:`profile`"
" and :mod:`pstats` modules provide tools for identifying time critical "
"sections in larger blocks of code."
msgstr""
"与 :mod:`timeit` 的精细粒度级别相反, :mod:`profile` 和 :mod:`pstats` "
"模块提供了用于在较大的代码块中识别时间关键部分的工具。"
#:../../tutorial/stdlib.rst:278
msgid"Quality Control"
msgstr"质量控制"
#:../../tutorial/stdlib.rst:280
msgid""
"One approach for developing high quality software is to write tests for each"
" function as it is developed and to run those tests frequently during the "
"development process."
msgstr"开发高质量软件的一种方法是在开发过程中为每个函数编写测试,并在开发过程中经常运行这些测试。"
#:../../tutorial/stdlib.rst:284
msgid""
"The :mod:`doctest` module provides a tool for scanning a module and "
"validating tests embedded in a program's docstrings. Test construction is "
"as simple as cutting-and-pasting a typical call along with its results into "
"the docstring. This improves the documentation by providing the user with an"
" example and it allows the doctest module to make sure the code remains true"
" to the documentation::"
msgstr""
":mod:`doctest` "
"模块提供了一个工具,用于扫描模块并验证程序文档字符串中嵌入的测试。测试构造就像将典型调用及其结果剪切并粘贴到文档字符串一样简单。这通过向用户提供示例来改进文档,并且它允许doctest模块确保代码保持对文档的真实::"
#:../../tutorial/stdlib.rst:302
msgid""
"The :mod:`unittest` module is not as effortless as the :mod:`doctest` "
"module, but it allows a more comprehensive set of tests to be maintained in "
"a separate file::"
msgstr":mod:`unittest` 模块不像 :mod:`doctest` 模块那样易于使用,但它允许在一个单独的文件中维护更全面的测试集::"
#:../../tutorial/stdlib.rst:324
msgid"Batteries Included"
msgstr"自带电池"
#:../../tutorial/stdlib.rst:326
msgid""
"Python has a \"batteries included\" philosophy. This is best seen through "
"the sophisticated and robust capabilities of its larger packages. For "
"example:"
msgstr"Python有“自带电池”的理念。通过其包的复杂和强大功能可以最好地看到这一点。例如:"
#:../../tutorial/stdlib.rst:329
msgid""
"The :mod:`xmlrpc.client` and :mod:`xmlrpc.server` modules make implementing "
"remote procedure calls into an almost trivial task. Despite the modules' "
"names, no direct knowledge or handling of XML is needed."
msgstr""
":mod:`xmlrpc.client` 和 :mod:`xmlrpc.server` 模块使得实现远程过程调用变成了小菜一碟。 "
"尽管存在于模块名称中,但用户不需要直接了解或处理 XML。"
#:../../tutorial/stdlib.rst:333
msgid""
"The :mod:`email` package is a library for managing email messages, including"
" MIME and other :rfc:`2822`-based message documents. Unlike :mod:`smtplib` "
"and :mod:`poplib` which actually send and receive messages, the email "
"package has a complete toolset for building or decoding complex message "
"structures (including attachments) and for implementing internet encoding "
"and header protocols."
msgstr""
" :mod:`email` 包是一个用于管理电子邮件的库,包括MIME和其他符合 :rfc:`2822` 规范的邮件文档。与 "
":mod:`smtplib` 和 :mod:`poplib` "
"不同(它们实际上做的是发送和接收消息),电子邮件包提供完整的工具集,用于构建或解码复杂的消息结构(包括附件)以及实现互联网编码和标头协议。"
#:../../tutorial/stdlib.rst:340
msgid""
"The :mod:`json` package provides robust support for parsing this popular "
"data interchange format. The :mod:`csv` module supports direct reading and "
"writing of files in Comma-Separated Value format, commonly supported by "
"databases and spreadsheets. XML processing is supported by the "
":mod:`xml.etree.ElementTree`, :mod:`xml.dom` and :mod:`xml.sax` packages. "
"Together, these modules and packages greatly simplify data interchange "
"between Python applications and other tools."
msgstr""
" :mod:`json` 包为解析这种流行的数据交换格式提供了强大的支持。 :mod:`csv` "
"模块支持以逗号分隔值格式直接读取和写入文件,这种格式通常为数据库和电子表格所支持。 XML 处理由 "
":mod:`xml.etree.ElementTree` , :mod:`xml.dom` 和 :mod:`xml.sax` "
"包支持。这些模块和软件包共同大大简化了 Python 应用程序和其他工具之间的数据交换。"
#:../../tutorial/stdlib.rst:349
msgid""
"The :mod:`sqlite3` module is a wrapper for the SQLite database library, "
"providing a persistent database that can be updated and accessed using "
"slightly nonstandard SQL syntax."
msgstr""
" :mod:`sqlite3` 模块是 SQLite 数据库库的包装器,提供了一个可以使用稍微非标准的 SQL 语法更新和访问的持久数据库。"
#:../../tutorial/stdlib.rst:353
msgid""
"Internationalization is supported by a number of modules including "
":mod:`gettext`, :mod:`locale`, and the :mod:`codecs` package."
msgstr"国际化由许多模块支持,包括 :mod:`gettext` , :mod:`locale` ,以及 :mod:`codecs` 包。"