@@ -95,13 +95,15 @@ msgid ""
9595"the output for easier reading. If the :envvar:`PAGER` environment variable "
9696"is set, :program:`pydoc` will use its value as a pagination program."
9797msgstr ""
98+ "当打印输出到控制台时,:program:`pydoc` 会尝试对输出进行分页以方便阅读。 如果设置了 :envvar:`PAGER` "
99+ "环境变量,:program:`pydoc` 将使用该变量值作为分页程序。"
98100
99101#: ../../library/pydoc.rst:58
100102msgid ""
101103"Specifying a ``-w`` flag before the argument will cause HTML documentation "
102104"to be written out to a file in the current directory, instead of displaying "
103105"text on the console."
104- msgstr ""
106+ msgstr "在参数前指定 ``-w`` 旗标将把 HTML 文档写入到当前目录下的一个文件中,而不是在控制台中显示文本。 "
105107
106108#: ../../library/pydoc.rst:62
107109msgid ""
@@ -110,6 +112,8 @@ msgid ""
110112"manner similar to the Unix :program:`man` command. The synopsis line of a "
111113"module is the first line of its documentation string."
112114msgstr ""
115+ "在参数前指定 ``-k`` 旗标将在全部可用模块的提要行中搜索参数所给定的关键字,具体方式同样类似于 Unix :program:`man` 命令。 "
116+ "模块的提要行就是其文档字符串的第一行。"
113117
114118#: ../../library/pydoc.rst:67
115119msgid ""
@@ -120,6 +124,9 @@ msgid ""
120124" Web browser. Specifying ``0`` as the port number will select an arbitrary "
121125"unused port."
122126msgstr ""
127+ "你还可以使用 :program:`pydoc` 在本机上启动一个 HTTP 服务,这将向来访的 Web 浏览器提供文档服务。 "
128+ ":program:`pydoc -p 1234` 将在 1234 端口上启动 HTTP 服务,允许你在你喜欢的 Web 服务器中通过 "
129+ "``http://localhost:1234/`` 浏览文档内容。 指定 ``0`` 作为端口号将会任意选择一个未使用的端口。"
123130
124131#: ../../library/pydoc.rst:73
125132msgid ""
@@ -129,6 +136,8 @@ msgid ""
129136"that the server responds to. During development this is especially useful "
130137"if you want to run pydoc from within a container."
131138msgstr ""
139+ ":program:`pydoc -n <hostname>` 将启动在给定主机名上执行监听的服务。 默认主机名为 'localhost' "
140+ "但如果你希望能从其他机器搜索该服务器,你可能会想要改变服务器所响应的主机名。 在开发阶段此特性会特别有用,因为这样你将能在一个容器中运行 pydoc。"
132141
133142#: ../../library/pydoc.rst:79
134143msgid ""
@@ -138,6 +147,9 @@ msgid ""
138147" with a keyword in their synopsis line, and go to the *Module index*, "
139148"*Topics* and *Keywords* pages."
140149msgstr ""
150+ ":program:`pydoc -b` 将启动服务并额外打开一个 Web 浏览器访问模块索引页。 所发布的每个页面顶端都带有导航栏,你可以点击 "
151+ "*Get* 获取特定条目的帮助,点击 *Search* 在所有模块的提要行中搜索特定关键词,或是点击 *Module index*, *Topics* "
152+ "和 *Keywords* 前往相应的页面。"
141153
142154#: ../../library/pydoc.rst:85
143155msgid ""
@@ -146,6 +158,8 @@ msgid ""
146158"spam` documents precisely the version of the module you would get if you "
147159"started the Python interpreter and typed ``import spam``."
148160msgstr ""
161+ "当 :program:`pydoc` 生成文档内容时,它会使用当前环境和路径来定位模块。 因此,发起调用 :program:`pydoc spam` "
162+ "得到的文档版本会与你启动 Python 解释器并输入 ``import spam`` 时得到的模块版本完全相同。"
149163
150164#: ../../library/pydoc.rst:90
151165msgid ""
@@ -156,6 +170,9 @@ msgid ""
156170"different URL or to a local directory containing the Library Reference "
157171"Manual pages."
158172msgstr ""
173+ "核心模块的模块文档位置对应于 ``https://docs.python.org/X.Y/library/`` 其中 ``X`` 和 ``Y`` 是 "
174+ "Python 解释器的主要版本号和小版本号。 这可通过设置 :envvar:`PYTHONDOCS` 环境变量来重载为指向不同的 URL 或包含 "
175+ "Library Reference Manual 页面的本地目录。"
159176
160177#: ../../library/pydoc.rst:97
161178msgid "Added the ``-b`` option."
@@ -171,6 +188,8 @@ msgid ""
171188":func:`inspect.getfullargspec` to extract signature information from "
172189"callables."
173190msgstr ""
191+ ":mod:`pydoc` 现在会使用 :func:`inspect.signature` 而非 "
192+ ":func:`inspect.getfullargspec` 来从可调用对象中提取签名信息。"
174193
175194#: ../../library/pydoc.rst:108
176195msgid "Added the ``-n`` option."
0 commit comments