7
7
# 钟旭尧 <python_zhong@qq.com>, 2024
8
8
# Rafael Fontenelle <rffontenelle@gmail.com>, 2024
9
9
# Unknownuserfrommars, 2024
10
+ # Freesand Leo <yuqinju@163.com>, 2024
10
11
#
11
12
#, fuzzy
12
13
msgid ""
13
14
msgstr ""
14
15
"Project-Id-Version : Python 3.12\n "
15
16
"Report-Msgid-Bugs-To : \n "
16
- "POT-Creation-Date : 2024-07-29 04:36 +0000\n "
17
+ "POT-Creation-Date : 2024-08-09 17:14 +0000\n "
17
18
"PO-Revision-Date : 2024-05-11 00:34+0000\n "
18
- "Last-Translator : Unknownuserfrommars , 2024\n "
19
+ "Last-Translator : Freesand Leo <yuqinju@163.com> , 2024\n "
19
20
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
20
21
"MIME-Version : 1.0\n "
21
22
"Content-Type : text/plain; charset=UTF-8\n "
@@ -52,6 +53,10 @@ msgid ""
52
53
"and :func:`enumerate`. The :keyword:`in` operator can now be used for "
53
54
"substring searches (e.g. ``\" ab\" in \" abc\" `` returns :const:`True`)."
54
55
msgstr ""
56
+ "Python 2.3 的主要主题是完善在 2.2 中添加的一些功能、为核心语言添加各种小但实用的增强功能,以及扩展标准库。 "
57
+ "上一版本引入的新对象模型已经受益于 18 个月的错误修复和优化努力,这些优化提升了新式类的性能。 新增了几个内置函数,例如 :func:`sum` 和 "
58
+ ":func:`enumerate`。 :keyword:`in` 操作符现在可以用于子字符串搜索 (例如,``\" ab\" in \" abc\" `` "
59
+ "将返回 :const:`True`)。"
55
60
56
61
#: ../../whatsnew/2.3.rst:23
57
62
msgid ""
@@ -62,6 +67,8 @@ msgid ""
62
67
"CSV files, processing command-line options, using BerkeleyDB databases... "
63
68
"the list of new and enhanced modules is lengthy."
64
69
msgstr ""
70
+ "许多新库功能包括布尔值、集合、堆、日期/时间数据类型,从ZIP格式的归档文件中导入模块的能力,期待已久的 Python 目录的元数据支持,更新版本的 "
71
+ "IDLE,以及用于日志记录、文本包装、解析 CSV 文件、处理命令行选项、使用 BerkeleyDB 数据库的模块…… 新模块和增强模块的列表相当长。"
65
72
66
73
#: ../../whatsnew/2.3.rst:30
67
74
msgid ""
@@ -72,6 +79,8 @@ msgid ""
72
79
"understand the complete implementation and design rationale, refer to the "
73
80
"PEP for a particular new feature."
74
81
msgstr ""
82
+ "本文并不试图提供对新功能的完整规范,而是提供了一个方便的概览。 有关详细信息,你应该参考 Python 2.3 的文档,例如 Python 库参考和 "
83
+ "Python 参考手册。 如果你想了解完整的实现和设计原理,请参阅特定新功能的 PEP。"
75
84
76
85
#: ../../whatsnew/2.3.rst:41
77
86
msgid "PEP 218: A Standard Set Datatype"
@@ -86,6 +95,9 @@ msgid ""
86
95
"dictionary keys. Sets are built on top of dictionaries, so the elements "
87
96
"within a set must be hashable."
88
97
msgstr ""
98
+ "新的 :mod:`!sets` 模块包含一个集合数据类型的实现。 :class:`Set` 类用于可变集合,即可以添加和删除成员的集合。 "
99
+ ":class:`!ImmutableSet` 类用于不可修改的集合,因此 :class:`!ImmutableSet` 的实例可以用作字典的键。 "
100
+ "集合是基于字典构建的,因此集合中的元素必须是可哈希的。"
89
101
90
102
#: ../../whatsnew/2.3.rst:50
91
103
msgid "Here's a simple example::"
@@ -99,6 +111,9 @@ msgid ""
99
111
"sets also have in-place versions of these methods, :meth:`!union_update` and"
100
112
" :meth:`~frozenset.intersection_update`. ::"
101
113
msgstr ""
114
+ "集合的并集和交集可以通过 :meth:`~frozenset.union` 和 :meth:`~frozenset.intersection` "
115
+ "方法计算;另一种表示法是使用按位操作符 ``&`` 和 ``|``。 可变集合还具有这些方法的原地版本,分别为 "
116
+ ":meth:`!union_update` 和 :meth:`~frozenset.intersection_update`。"
102
117
103
118
#: ../../whatsnew/2.3.rst:86
104
119
msgid ""
@@ -109,6 +124,9 @@ msgid ""
109
124
"notation (``^``), and an in-place version with the ungainly name "
110
125
":meth:`~frozenset.symmetric_difference_update`. ::"
111
126
msgstr ""
127
+ "还可以计算两个集合的对称差集。 这是并集中不在交集中的所有元素。 换句话说,对称差集包含所有只在一个集合中的元素。 "
128
+ "同样,还有一种替代表示法是使用按位操作符 (``^``),并且有一个原地修改版本,名字比较长,叫 "
129
+ ":meth:`~frozenset.symmetric_difference_update`。"
112
130
113
131
#: ../../whatsnew/2.3.rst:100
114
132
msgid ""
@@ -141,6 +159,9 @@ msgid ""
141
159
"2.2\" document; if you read it back when Python 2.2 came out, you can skip "
142
160
"the rest of this section."
143
161
msgstr ""
162
+ "在 Python 2.2 中,生成器作为一个可选特性被添加,需要通过 ``from __future__ import generators`` "
163
+ "指令来启用。 在 2.3 版本中,生成器不再需要特别启用,现在总是存在;这意味着 :keyword:`yield` 现在始终是一个关键字。 "
164
+ "本节的其余部分是从《Python 2.2的新特性》文档中复制的生成器描述;如果你在 Python 2.2 发布时已经阅读过,可以跳过本节的其余部分。"
144
165
145
166
#: ../../whatsnew/2.3.rst:136
146
167
msgid ""
@@ -154,6 +175,10 @@ msgid ""
154
175
"This is what generators provide; they can be thought of as resumable "
155
176
"functions."
156
177
msgstr ""
178
+ "你一定熟悉在 Python 或 C 语言中函数调用的工作方式。 当你调用一个函数时,它会获得一个私有命名空间,在这个命名空间中创建其局部变量。 "
179
+ "当函数执行到 :keyword:`return` 语句时,这些局部变量会被销毁,并将结果值返回给调用者。 "
180
+ "稍后对同一个函数的调用将获得一套全新的局部变量。 "
181
+ "但是,如果局部变量在函数退出时不被丢弃呢?如果你可以在函数停止的地方稍后恢复执行呢?这就是生成器所提供的功能;它们可以被视为可恢复的函数。"
157
182
158
183
#: ../../whatsnew/2.3.rst:145
159
184
msgid "Here's the simplest example of a generator function::"
@@ -166,6 +191,8 @@ msgid ""
166
191
"this is detected by Python's bytecode compiler which compiles the function "
167
192
"specially as a result."
168
193
msgstr ""
194
+ "一个新的关键字 :keyword:`yield` 被引入用于生成器。 任何包含 :keyword:`!yield` 语句的函数都是生成器函数;这由 "
195
+ "Python 的字节码编译器检测到,并因此对函数进行特殊编译。"
169
196
170
197
#: ../../whatsnew/2.3.rst:156
171
198
msgid ""
@@ -759,6 +786,7 @@ msgid ""
759
786
"The full list of classifiers can be obtained by running ``python setup.py "
760
787
"register --list-classifiers``."
761
788
msgstr ""
789
+ "完整的 classifiers 列表可通过运行 ``python setup.py register --list-classifiers`` 来获取。"
762
790
763
791
#: ../../whatsnew/2.3.rst:694
764
792
msgid ":pep:`301` - Package Index and Metadata for Distutils"
0 commit comments