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

Skip to content

Commit 2942873

Browse files
[po] auto sync
1 parent f1aa6c3 commit 2942873

9 files changed

Lines changed: 6416 additions & 6336 deletions

File tree

c-api/long.po

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Translators:
77
# Freesand Leo <[email protected]>, 2020
88
# Vegetables <[email protected]>, 2020
9+
# Sean Chao <[email protected]>, 2020
910
#
1011
#, fuzzy
1112
msgid ""
@@ -14,7 +15,7 @@ msgstr ""
1415
"Report-Msgid-Bugs-To: \n"
1516
"POT-Creation-Date: 2020-07-05 14:24+0000\n"
1617
"PO-Revision-Date: 2020-05-30 11:49+0000\n"
17-
"Last-Translator: Vegetables <[email protected]>, 2020\n"
18+
"Last-Translator: Sean Chao <[email protected]>, 2020\n"
1819
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1920
"MIME-Version: 1.0\n"
2021
"Content-Type: text/plain; charset=UTF-8\n"
@@ -37,33 +38,36 @@ msgid ""
3738
"be distinguished from a number. Use :c:func:`PyErr_Occurred` to "
3839
"disambiguate."
3940
msgstr ""
41+
"在出错时,大多数 ``PyLong_As*`` API返回 ``(返回值类型)-1`` ,无法与一般的数字区分开来。请使用 "
42+
":c:func:`PyErr_Occurred` 来区分。"
4043

4144
#: ../../c-api/long.rst:18
4245
msgid "This subtype of :c:type:`PyObject` represents a Python integer object."
43-
msgstr ""
46+
msgstr "表示 Python 整数对象的 :c:type:`PyObject` 子类型。"
4447

4548
#: ../../c-api/long.rst:23
4649
msgid ""
4750
"This instance of :c:type:`PyTypeObject` represents the Python integer type. "
4851
"This is the same object as :class:`int` in the Python layer."
4952
msgstr ""
53+
"这个 :c:type:`PyTypeObject` 的实例表示 Python 的整数类型。与Python层中的 :class:`int` 相同。"
5054

5155
#: ../../c-api/long.rst:29
5256
msgid ""
5357
"Return true if its argument is a :c:type:`PyLongObject` or a subtype of "
5458
":c:type:`PyLongObject`."
55-
msgstr ""
59+
msgstr "如果参数是 :c:type:`PyLongObject` 或 :c:type:`PyLongObject` 的子类型,返回 true 。"
5660

5761
#: ../../c-api/long.rst:35
5862
msgid ""
5963
"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype "
6064
"of :c:type:`PyLongObject`."
61-
msgstr ""
65+
msgstr "如果参数是 :c:type:`PyLongObject` 但不是 :c:type:`PyLongObject` 的子类型,返回 true。"
6266

6367
#: ../../c-api/long.rst:41
6468
msgid ""
6569
"Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure."
66-
msgstr ""
70+
msgstr "由 *v* 返回一个新的 :c:type:`PyLongObject` 对象,失败时返回 ``NULL`` 。"
6771

6872
#: ../../c-api/long.rst:43
6973
msgid ""
@@ -79,36 +83,43 @@ msgid ""
7983
"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long`,"
8084
" or ``NULL`` on failure."
8185
msgstr ""
86+
"由 C :c:type:`unsigned long` 类型返回一个新的 :c:type:`PyLongObject` 对象,失败时返回 "
87+
"``NULL`` 。"
8288

8389
#: ../../c-api/long.rst:58
8490
msgid ""
8591
"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or"
8692
" ``NULL`` on failure."
8793
msgstr ""
94+
"从 C :c:type:`Py_ssize_t` 类型返回一个新的 :c:type:`PyLongObject` 对象,如果失败则返回``NULL``。"
8895

8996
#: ../../c-api/long.rst:64
9097
msgid ""
9198
"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or "
9299
"``NULL`` on failure."
93100
msgstr ""
101+
"从 C :c:type:`size_t` 返回一个新的 :c:type:`PyLongObject` 对象,如果失败则返回``NULL``。"
94102

95103
#: ../../c-api/long.rst:70
96104
msgid ""
97105
"Return a new :c:type:`PyLongObject` object from a C :c:type:`long long`, or "
98106
"``NULL`` on failure."
99107
msgstr ""
108+
"从 C :c:type:`long long` 返回一个新的 :c:type:`PyLongObject` 对象,失败时返回``NULL``。"
100109

101110
#: ../../c-api/long.rst:76
102111
msgid ""
103112
"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long "
104113
"long`, or ``NULL`` on failure."
105114
msgstr ""
115+
"从 C :c:type:`unsigned long long` 返回一个新的 :c:type:`PyLongObject` "
116+
"对象,失败时返回``NULL``。"
106117

107118
#: ../../c-api/long.rst:82
108119
msgid ""
109120
"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or "
110121
"``NULL`` on failure."
111-
msgstr ""
122+
msgstr "从 *v* 的整数部分返回一个新的 :c:type:`PyLongObject` 对象,如果失败则返回``NULL``。"
112123

113124
#: ../../c-api/long.rst:88
114125
msgid ""
@@ -122,6 +133,11 @@ msgid ""
122133
"and single underscores after a base specifier and between digits are "
123134
"ignored. If there are no digits, :exc:`ValueError` will be raised."
124135
msgstr ""
136+
"根据 *str* 字符串值返回一个新的 :c:type:`PyLongObject` ,*base* 指定基数。如果 *pend* 不是 "
137+
"``NULL`` , */*pend* 将指向 *str* 中表示这个数字部分的后面的第一个字符。如果 *base* 是 ``0`` , *str* "
138+
"将使用 :ref:`integers` 定义来解释;在这种情况下,一个非零的十进制数中的前导零会引发一个 :exc:`ValueError` 。如果 "
139+
"*base* 不是 ``0`` ,它必须在 ``2`` 和` `36`` "
140+
"之间,包括2和36。基数说明符后以及数字之间的前导空格、单下划线将被忽略。如果没有数字,将引发 :exc:`ValueError`。"
125141

126142
#: ../../c-api/long.rst:101
127143
msgid "Convert a sequence of Unicode digits to a Python integer value."

library/contextlib.po

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
#
66
# Translators:
77
# cdarlint <[email protected]>, 2020
8-
# Freesand Leo <[email protected]>, 2020
98
# dannyvi <[email protected]>, 2020
109
# Meng Du <[email protected]>, 2020
1110
# nick <[email protected]>, 2020
11+
# Heyi Tang <[email protected]>, 2020
12+
# Freesand Leo <[email protected]>, 2020
1213
#
1314
#, fuzzy
1415
msgid ""
@@ -17,7 +18,7 @@ msgstr ""
1718
"Report-Msgid-Bugs-To: \n"
1819
"POT-Creation-Date: 2020-02-09 12:40+0000\n"
1920
"PO-Revision-Date: 2020-05-30 11:58+0000\n"
20-
"Last-Translator: nick <2330458484@qq.com>, 2020\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
2122
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2223
"MIME-Version: 1.0\n"
2324
"Content-Type: text/plain; charset=UTF-8\n"
@@ -28,7 +29,7 @@ msgstr ""
2829
#: ../../library/contextlib.rst:2
2930
msgid ""
3031
":mod:`!contextlib` --- Utilities for :keyword:`!with`\\ -statement contexts"
31-
msgstr ""
32+
msgstr ":mod:`!contextlib` --- 为 :keyword:`!with`\\ 语句上下文提供的工具"
3233

3334
#: ../../library/contextlib.rst:7
3435
msgid "**Source code:** :source:`Lib/contextlib.py`"
@@ -60,6 +61,10 @@ msgid ""
6061
"default returns ``None``. See also the definition of "
6162
":ref:`typecontextmanager`."
6263
msgstr ""
64+
"一个为实现了 :meth:`object.__aenter__` 与 :meth:`object.__aexit__` 的类提供的 "
65+
":term:`abstract base class`。 为 :meth:`object.__aenter__` 提供的一个默认实现是返回 "
66+
"``self`` 而 :meth:`object.__aexit__` 是一个默认返回 ``None`` 的抽象方法。 参见 :ref:`async-"
67+
"context-managers` 的定义。"
6368

6469
#: ../../library/contextlib.rst:34
6570
msgid ""
@@ -70,13 +75,19 @@ msgid ""
7075
"default returns ``None``. See also the definition of :ref:`async-context-"
7176
"managers`."
7277
msgstr ""
78+
"一个为实现了 :meth:`object.__aenter__` 与 :meth:`object.__aexit__` 的类提供的 "
79+
":term:`abstract base class`。 为 :meth:`object.__aenter__` 提供的一个默认实现是返回 "
80+
"``self`` 而 :meth:`object.__aexit__` 是一个默认返回 ``None`` 的抽象方法。 参见 :ref:`async-"
81+
"context-managers` 的定义。"
7382

7483
#: ../../library/contextlib.rst:46
7584
msgid ""
7685
"This function is a :term:`decorator` that can be used to define a factory "
7786
"function for :keyword:`with` statement context managers, without needing to "
7887
"create a class or separate :meth:`__enter__` and :meth:`__exit__` methods."
7988
msgstr ""
89+
"这个函数是一个 :term:`decorator` ,它可以定义一个支持 :keyword:`with` 语句上下文的工厂函数, 而不需要创建一个类或区"
90+
" :meth:`__enter__` 与 :meth:`__exit__` 方法。"
8091

8192
#: ../../library/contextlib.rst:50
8293
msgid ""
@@ -85,12 +96,14 @@ msgid ""
8596
"and doesn't implement a ``close()`` method for use with "
8697
"``contextlib.closing``"
8798
msgstr ""
99+
"尽管许多对象原生支持使用 with 语句,但有些需要被管理的资源并不是上下文管理器,并且没有实现 ``close()`` 方法而不能使用 "
100+
"``contextlib.closing`` 。"
88101

89102
#: ../../library/contextlib.rst:54
90103
msgid ""
91104
"An abstract example would be the following to ensure correct resource "
92105
"management::"
93-
msgstr ""
106+
msgstr "下面是一个抽象的示例,展示如何确保正确的资源管理:"
94107

95108
#: ../../library/contextlib.rst:73
96109
msgid ""
@@ -117,6 +130,11 @@ msgid ""
117130
"handled, and execution will resume with the statement immediately following "
118131
"the :keyword:`!with` statement."
119132
msgstr ""
133+
"当生成器发生 yield 时,嵌套在 :keyword:`with` 语句中的语句体会被执行。 语句体执行完毕离开之后,该生成器将被恢复执行。 "
134+
"如果在该语句体中发生了未处理的异常,则该异常会在生成器发生 yield 时重新被引发。 因此,你可以使用 :keyword:`try`...\\ "
135+
":keyword:`except`...\\ :keyword:`finally` 语句来捕获该异常(如果有的话),或确保进行了一些清理。 "
136+
"如果仅出于记录日志或执行某些操作(而非完全抑制异常)的目的捕获了异常,生成器必须重新引发该异常。 否则生成器的上下文管理器将向 "
137+
":keyword:`!with` 语句指示该异常已经被处理,程序将立即在 :keyword:`!with` 语句之后恢复并继续执行。"
120138

121139
#: ../../library/contextlib.rst:89
122140
msgid ""
@@ -128,10 +146,13 @@ msgid ""
128146
"that context managers support multiple invocations in order to be used as "
129147
"decorators)."
130148
msgstr ""
149+
":func:`contextmanager` 使用 :class:`ContextDecorator` 因此它创建的上下文管理器不仅可以用在 "
150+
":keyword:`with` 语句中,还可以用作一个装饰器。当它用作一个装饰器时,每一次函数调用时都会隐式创建一个新的生成器实例(这使得 "
151+
":func:`contextmanager` 创建的上下文管理器满足了支持多次调用以用作装饰器的需求,而非“一次性”的上下文管理器)。"
131152

132153
#: ../../library/contextlib.rst:96
133154
msgid "Use of :class:`ContextDecorator`."
134-
msgstr ""
155+
msgstr ":class:`ContextDecorator` 的使用。"
135156

136157
#: ../../library/contextlib.rst:102
137158
msgid ""

0 commit comments

Comments
 (0)