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

Skip to content

Commit 102870b

Browse files
[po] auto sync
1 parent cc7b487 commit 102870b

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "94.98%", "updated_at": "2024-03-22T14:56:27Z"}
1+
{"translation": "94.99%", "updated_at": "2024-03-22T15:56:28Z"}

library/pydoc.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ msgid ""
5050
"the source file, or at the top of the module (see "
5151
":func:`inspect.getcomments`)."
5252
msgstr ""
53+
"对于模块、类、函数和方法,显示的文档内容取自对象的文档字符串(即 :attr:`!__doc__` 属性),并会递归地从其带有文档的成员中获取。 "
54+
"如果没有文档字符串,则 :mod:`!pydoc` 会尝试从源文件中类、函数或方法的定义上方,或是模块顶部的注释行代码块获取描述文本(参见 "
55+
":func:`inspect.getcomments`。)"
5356

5457
#: ../../library/pydoc.rst:30
5558
msgid ""
@@ -59,6 +62,8 @@ msgid ""
5962
"be viewed from outside the Python interpreter by running :program:`pydoc` as"
6063
" a script at the operating system's command prompt. For example, running ::"
6164
msgstr ""
65+
"内置函数 :func:`help` 会发起调用交互式解释器的在线帮助系统,该系统使用 :mod:`!pydoc` 在控制台上生成文本形式的文档内容。 "
66+
"同样的文本文档也可以在 Python 解释器以外通过在操作系统的命令提示符中以脚本方式运行 :program:`pydoc` 来查看。 例如,运行 ::"
6267

6368
#: ../../library/pydoc.rst:38
6469
msgid ""
@@ -83,6 +88,8 @@ msgid ""
8388
"executed on that occasion. Use an ``if __name__ == '__main__':`` guard to "
8489
"only execute code when a file is invoked as a script and not just imported."
8590
msgstr ""
91+
"为了找到对象及其文档的内容,:mod:`!pydoc` 会导入文档所属的模块。 因而,在此情况下任何模块层级的代码都将被执行。 请使用 ``if "
92+
"__name__ == '__main__':`` 来确保特定代码仅在文件是作为脚本被发起调用而不是被导入时执行。"
8693

8794
#: ../../library/pydoc.rst:54
8895
msgid ""
@@ -166,6 +173,9 @@ msgid ""
166173
"different URL or to a local directory containing the Library Reference "
167174
"Manual pages."
168175
msgstr ""
176+
"核心模块的模块文档应当位于 ``https://docs.python.org/X.Y/library/`` 其中 ``X`` 和 ``Y`` 是 "
177+
"Python 解释器的主要和次要版本号。 这可以通过将 :envvar:`!PYTHONDOCS` 环境变量设为不同的 URL "
178+
"或包含标准库参考指南页面的本地目录来覆盖。"
169179

170180
#: ../../library/pydoc.rst:97
171181
msgid "Added the ``-b`` option."
@@ -181,6 +191,8 @@ msgid ""
181191
":func:`inspect.getfullargspec` to extract signature information from "
182192
"callables."
183193
msgstr ""
194+
"现在 :mod:`!pydoc` 会使用 :func:`inspect.signature` 而不是 "
195+
":func:`inspect.getfullargspec` 来从可调用对象中提取签名信息。"
184196

185197
#: ../../library/pydoc.rst:108
186198
msgid "Added the ``-n`` option."

reference/simple_stmts.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,13 +1185,19 @@ msgid ""
11851185
"name is not bound in any nonlocal scope, or if there is no nonlocal scope, a"
11861186
" :exc:`SyntaxError` is raised."
11871187
msgstr ""
1188+
"当一个函数或类的定义嵌套(被包围)在其他函数的定义中时,其非局部作用域就是包围它的函数的局部作用域 。 :keyword:`nonlocal` "
1189+
"语句会使其所列出的标识符指向之前在非局部作用域中绑定的名称。 它允许封装的代码重新绑定这样的非局部标识符。 "
1190+
"如果一个名称在多个非局部作用域中都被绑定,则会使用最近的绑定。 如果一个名称在任何非局部作用域中都未被绑定,或者不存在非局部作用域,则会引发 "
1191+
":exc:`SyntaxError`。"
11881192

11891193
#: ../../reference/simple_stmts.rst:1018
11901194
msgid ""
11911195
"The nonlocal statement applies to the entire scope of a function or class "
11921196
"body. A :exc:`SyntaxError` is raised if a variable is used or assigned to "
11931197
"prior to its nonlocal declaration in the scope."
11941198
msgstr ""
1199+
"nonlocal 语句的作用范围是整个函数或类语句体。 如果一个变量在本作用域的 nonlocal 声明之前被使用或赋值则会引发 "
1200+
":exc:`SyntaxError`。"
11951201

11961202
#: ../../reference/simple_stmts.rst:1024
11971203
msgid ":pep:`3104` - Access to Names in Outer Scopes"
@@ -1207,6 +1213,8 @@ msgid ""
12071213
"applies only to code parsed along with it. See the note for the "
12081214
":keyword:`global` statement."
12091215
msgstr ""
1216+
"**程序员注意事项:** :keyword:`nonlocal` 是对解析器的指令并且仅会在与其一同被解析的代码上应用。 参见 "
1217+
":keyword:`global` 语句的相关注意事项。"
12101218

12111219
#: ../../reference/simple_stmts.rst:1035
12121220
msgid "The :keyword:`!type` statement"

0 commit comments

Comments
 (0)