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

Skip to content

Commit 4bbca88

Browse files
committed
[po] auto sync bot
1 parent 663c9a5 commit 4bbca88

2 files changed

Lines changed: 27 additions & 10 deletions

File tree

glossary.po

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,10 +1181,17 @@ msgid ""
11811181
"with an iterator will just return the same exhausted iterator object used in"
11821182
" the previous iteration pass, making it appear like an empty container."
11831183
msgstr ""
1184+
"用来表示一连串数据流的对象。重复调用迭代器的 :meth:`~iterator.__next__` 方法(或将其传给内置函数 "
1185+
":func:`next`)将逐个返回流中的项。当没有数据可用时则将引发 :exc:`StopIteration` "
1186+
"异常。到这时迭代器对象中的数据项已耗尽,继续调用其 :meth:`__next__` 方法只会再次引发 :exc:`StopIteration` "
1187+
"异常。迭代器必须具有 :meth:`__iter__` "
1188+
"方法用来返回该迭代器对象自身,因此迭代器必定也是可迭代对象,可被用于其他可迭代对象适用的大部分场合。一个显著的例外是那些会多次重复访问迭代项的代码。容器对象(例如"
1189+
" :class:`list`)在你每次向其传入 :func:`iter` 函数或是在 :keyword:`for` "
1190+
"循环中使用它时都会产生一个新的迭代器。如果在此情况下你尝试用迭代器则会返回在之前迭代过程中被耗尽的同一迭代器对象,使其看起来就像是一个空容器。"
11841191

11851192
#: ../../glossary.rst:600
11861193
msgid "More information can be found in :ref:`typeiter`."
1187-
msgstr ""
1194+
msgstr "更多信息可查看 :ref:`typeiter`。"
11881195

11891196
#: ../../glossary.rst:601
11901197
msgid "key function"
@@ -1196,6 +1203,8 @@ msgid ""
11961203
" for sorting or ordering. For example, :func:`locale.strxfrm` is used to "
11971204
"produce a sort key that is aware of locale specific sort conventions."
11981205
msgstr ""
1206+
"键函数或称整理函数,是能够返回用于排序或排位的值的可调用对象。例如,:func:`locale.strxfrm` "
1207+
"可用于生成一个符合特定区域排序约定的排序键。"
11991208

12001209
#: ../../glossary.rst:608
12011210
msgid ""
@@ -1204,6 +1213,9 @@ msgid ""
12041213
" :meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, "
12051214
":func:`heapq.nlargest`, and :func:`itertools.groupby`."
12061215
msgstr ""
1216+
"Python 中有许多工具都允许用键函数来控制元素的排位或分组方式。其中包括 "
1217+
":func:`min`、:func:`max`、:func:`sorted`、:meth:`list.sort`、:func:`heapq.merge`、:func:`heapq.nsmallest`、:func:`heapq.nlargest`"
1218+
" 以及 :func:`itertools.groupby`。"
12071219

12081220
#: ../../glossary.rst:614
12091221
msgid ""
@@ -1216,14 +1228,19 @@ msgid ""
12161228
":func:`~operator.methodcaller`. See the :ref:`Sorting HOW TO "
12171229
"<sortinghowto>` for examples of how to create and use key functions."
12181230
msgstr ""
1231+
"要创建一个键函数有多种方式。例如,:meth:`str.lower` 方法可以用作忽略大小写排序的键函数。另外,键函数也可通过 "
1232+
":keyword:`lambda` 表达式来创建,例如 ``lambda r: (r[0], r[2])``。还有 :mod:`operator` "
1233+
"模块提供了三个键函数构造器::func:`~operator.attrgetter`、:func:`~operator.itemgetter` 和 "
1234+
":func:`~operator.methodcaller`。请查看 :ref:`如何排序 <sortinghowto>` "
1235+
"一节以获取创建和使用键函数的示例。"
12191236

12201237
#: ../../glossary.rst:622
12211238
msgid "keyword argument"
12221239
msgstr "keyword argument -- 关键字参数"
12231240

12241241
#: ../../glossary.rst:624 ../../glossary.rst:883
12251242
msgid "See :term:`argument`."
1226-
msgstr ""
1243+
msgstr "参见 :term:`argument`。"
12271244

12281245
#: ../../glossary.rst:625
12291246
msgid "lambda"

tutorial/modules.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ msgid ""
155155
"However, it is okay to use it to save typing in interactive sessions."
156156
msgstr ""
157157
"注意通常情况下从一个模块或者包内调入 ``*`` 的做法是不太被接受的, "
158-
"因为这通常会导致可读性很差的代码。不过,在交互式编译器中为了节省打字可以这么用。 "
158+
"因为这通常会导致代码的可读性很差。不过,在交互式编译器中为了节省打字可以这么用。 "
159159

160160
#: ../../tutorial/modules.rst:115
161161
msgid ""
@@ -182,8 +182,8 @@ msgid ""
182182
"use :func:`importlib.reload`, e.g. ``import importlib; "
183183
"importlib.reload(modulename)``."
184184
msgstr ""
185-
"出于效率的考虑,每个模块在单个解释器存续期内只被导入一次。因此,如果您更改了您的模块,您必须重新启动解释器, "
186-
"或者,如果您想交互式地测试仅仅一个模块,使用 :func:`importlib.reload`,例如 ``import importlib; "
185+
"出于效率的考虑,每个模块在每个解释器会话中只被导入一次。因此,如果你更改了你的模块,则必须重新启动解释器, "
186+
"或者,如果它只是一个要交互式地测试的模块,请使用 :func:`importlib.reload`,例如 ``import importlib; "
187187
"importlib.reload(modulename)``。"
188188

189189
#: ../../tutorial/modules.rst:146
@@ -192,28 +192,28 @@ msgstr " 以脚本的方式执行模块"
192192

193193
#: ../../tutorial/modules.rst:148
194194
msgid "When you run a Python module with ::"
195-
msgstr "当您用下面方式运行一个Python模块::"
195+
msgstr "当你用下面方式运行一个Python模块::"
196196

197197
#: ../../tutorial/modules.rst:152
198198
msgid ""
199199
"the code in the module will be executed, just as if you imported it, but "
200200
"with the ``__name__`` set to ``\"__main__\"``. That means that by adding "
201201
"this code at the end of your module::"
202202
msgstr ""
203-
"模块里的代码会被执行,就好像您导入了模块一样,但是 ``__name__`` 被赋值为 ``\"__main__\"``。 "
204-
"那意味着通过在你的模块末尾添加这些代码::"
203+
"模块里的代码会被执行,就好像你导入了模块一样,但是 ``__name__`` 被赋值为 ``\"__main__\"``。 "
204+
"这意味着通过在你的模块末尾添加这些代码::"
205205

206206
#: ../../tutorial/modules.rst:160
207207
msgid ""
208208
"you can make the file usable as a script as well as an importable module, "
209209
"because the code that parses the command line only runs if the module is "
210210
"executed as the \"main\" file:"
211211
msgstr ""
212-
"您既可以把这个文件当作脚本又可当作一个可调入的模块来使用, 因为那段解析命令行的代码只有在当模块是以“main”文件的方式执行的时候才会运行:"
212+
"你既可以把这个文件当作脚本又可当作一个可调入的模块来使用, 因为那段解析命令行的代码只有在当模块是以“main”文件的方式执行的时候才会运行:"
213213

214214
#: ../../tutorial/modules.rst:169
215215
msgid "If the module is imported, the code is not run::"
216-
msgstr "如果模块是被导入的,那些代码是没运行的::"
216+
msgstr "如果模块是被导入的,那些代码是不运行的::"
217217

218218
#: ../../tutorial/modules.rst:174
219219
msgid ""

0 commit comments

Comments
 (0)