@@ -15,7 +15,7 @@ msgid ""
15
15
msgstr ""
16
16
"Project-Id-Version : Python 3.8\n "
17
17
"Report-Msgid-Bugs-To : \n "
18
- "POT-Creation-Date : 2024-03-09 12:12 +0000\n "
18
+ "POT-Creation-Date : 2024-07-05 17:08 +0000\n "
19
19
"PO-Revision-Date : 2020-05-30 12:18+0000\n "
20
20
"Last-Translator : Freesand Leo <yuqinju@163.com>, 2024\n "
21
21
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -58,6 +58,8 @@ msgid ""
58
58
"have more details than the regular documentation; but note that PEPs usually"
59
59
" are not kept up-to-date once a feature has been fully implemented."
60
60
msgstr ""
61
+ "本文并不试图提供所有新特性的完整规范,而是试图提供一个方便的概述。 要了解完整的细节,您应该参考 Python 3.0 的文档和/或文中引用的许多 "
62
+ "PEP。 如果您想了解某个特性的完整实现和设计原理,PEP 通常比常规文档有更多的细节;但要注意的是,一旦某个特性被完全实现,PEP 通常不会保持更新。"
61
63
62
64
#: ../../whatsnew/3.0.rst:72
63
65
msgid ""
@@ -66,6 +68,7 @@ msgid ""
66
68
"distribution contains a wealth of detailed information about every small "
67
69
"thing that was changed."
68
70
msgstr ""
71
+ "由于时间有限,本文档不够完整。 对于新发布的版本,源代码发行版中的 ``Misc/NEWS`` 文件总是包含大量关于每一个细小改动的详细信息。"
69
72
70
73
#: ../../whatsnew/3.0.rst:89
71
74
msgid "Common Stumbling Blocks"
@@ -87,6 +90,8 @@ msgid ""
87
90
"with keyword arguments to replace most of the special syntax of the old "
88
91
"``print`` statement (:pep:`3105`). Examples::"
89
92
msgstr ""
93
+ "``print`` 语句已被 :func:`print` 函数取代,其关键字参数取代了旧 ``print`` 语句 (:pep:`3105`) "
94
+ "的大部分特殊语法。 示例::"
90
95
91
96
#: ../../whatsnew/3.0.rst:116
92
97
msgid "You can also customize the separator between items, e.g.::"
@@ -107,20 +112,25 @@ msgid ""
107
112
"\" B\" `` would write ``\" A\\ nB\\ n\" ``; but in Python 3.0, ``print(\" A\\ n\" , "
108
113
"\" B\" )`` writes ``\" A\\ n B\\ n\" ``."
109
114
msgstr ""
115
+ ":func:`print` 函数不支持旧 ``print`` 语句的 \" softspace\" 功能。例如,在 Python 2.x "
116
+ "中,``print \" A\\ n\" , \" B\" `` 会写入 ``\" A\\ nB\\ n\" ``;但在 Python 3.0 "
117
+ "中,``print(\" A\\ n\" , \" B\" )`` 会写入 ``\" A\\ n B\\ n\" ``。"
110
118
111
119
#: ../../whatsnew/3.0.rst:133
112
120
msgid ""
113
121
"Initially, you'll be finding yourself typing the old ``print x`` a lot in "
114
122
"interactive mode. Time to retrain your fingers to type ``print(x)`` "
115
123
"instead!"
116
- msgstr ""
124
+ msgstr "最初,您会发现自己在交互模式下经常输入旧的 ``print x`` 。是时候重新训练你的手指以输入 ``print(x)`` 了! "
117
125
118
126
#: ../../whatsnew/3.0.rst:137
119
127
msgid ""
120
128
"When using the ``2to3`` source-to-source conversion tool, all ``print`` "
121
129
"statements are automatically converted to :func:`print` function calls, so "
122
130
"this is mostly a non-issue for larger projects."
123
131
msgstr ""
132
+ "使用 ``2to3`` 源代码到源代码转换工具时,所有 ``print`` 语句都会自动转换为 :func:`print` "
133
+ "函数调用,因此对于大型项目来说,这基本上不是问题。"
124
134
125
135
#: ../../whatsnew/3.0.rst:143
126
136
msgid "Views And Iterators Instead Of Lists"
@@ -137,12 +147,17 @@ msgid ""
137
147
" longer works: ``k = d.keys(); k.sort()``. Use ``k = sorted(d)`` instead "
138
148
"(this works in Python 2.5 too and is just as efficient)."
139
149
msgstr ""
150
+ ":class:`dict` 方法 :meth:`dict.keys`、:meth:`dict.items` 和 :meth:`dict.values` "
151
+ "返回 “视图” 而不是列表。 例如,这个写法不再有效: ``k = d.keys(); k.sort()``。 请使用 ``k = "
152
+ "sorted(d)`` 代替(这在 Python 2.5 中也有效,而且同样高效)。"
140
153
141
154
#: ../../whatsnew/3.0.rst:153
142
155
msgid ""
143
156
"Also, the :meth:`dict.iterkeys`, :meth:`dict.iteritems` and "
144
157
":meth:`dict.itervalues` methods are no longer supported."
145
158
msgstr ""
159
+ "此外,不再支持 :meth:`dict.iterkeys`、:meth:`dict.iteritems` 和 "
160
+ ":meth:`dict.itervalues` 方法。"
146
161
147
162
#: ../../whatsnew/3.0.rst:156
148
163
msgid ""
@@ -155,6 +170,11 @@ msgid ""
155
170
"function; the correct transformation is to use a regular :keyword:`for` loop"
156
171
" (since creating a list would just be wasteful)."
157
172
msgstr ""
173
+ ":func:`map` 和 :func:`filter` 均返回迭代器。 如果你确实需要一个列表并且所有输入序列的长度相等,简单的解决办法是将 "
174
+ ":func:`map` 包装在 :func:`list` 中,例如 "
175
+ "``list(map(...))``,但更好的办法通常是使用列表推导式(特别是当原始代码使用了 :keyword:`lambda` "
176
+ "的时候),或是重写代码使得它完全不需要列表。 还有一种特殊技巧是将 :func:`map` 作为函数的附带影响发起调用;正确的转换方式是使用一个常规的 "
177
+ ":keyword:`for` 循环(因为创建列表会浪费资源)。"
158
178
159
179
#: ../../whatsnew/3.0.rst:167
160
180
msgid ""
0 commit comments