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

Skip to content

Commit 8f7ce2e

Browse files
[po] auto sync
1 parent 73641d8 commit 8f7ce2e

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

distutils/extending.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ msgid ""
118118
"used. This should never be set in a configuration file provided with a "
119119
"package."
120120
msgstr ""
121+
"从 Python 2.4 开始,还有第三个选项可用,其目标是允许添加支持现有 :file:`setup.py` 脚本的新命令,而不需要修改 Python"
122+
" 安装包。 这预计可允许第三方扩展提供对附加打包系统的支持,而相应命令又可用于任何 distutils 命令可被使用的地方。 新的配置选项 "
123+
"``command_packages`` (命令行选项为 :option:`!--command-packages`) "
124+
"可用来指定附加包,以在其中查找实现新增命令的模块。 像所有 distutils 选项一样,这可以通过命令行或配置文件来指定。 此选项只能在配置文件的 "
125+
"``[global]`` 小节之中或在命令行的任何命令之前设置。 "
126+
"如果是设置在配置文件中,则它可被命令行设置重载;如果在命令行中将其设为空字符串则将会使用默认值。 此选项绝不应当在随特定包提供的配置文件中设置。"
121127

122128
#: ../../distutils/extending.rst:76
123129
msgid ""
@@ -134,6 +140,12 @@ msgid ""
134140
":class:`distcmds.bdist_openpkg.bdist_openpkg` or "
135141
":class:`buildcmds.bdist_openpkg.bdist_openpkg`."
136142
msgstr ""
143+
"这个新选项可被用来添加任意数量的包到查找命令实现的包列表;多个包名应当以逗号分隔。 当未指明时,查找将只在 "
144+
":mod:`distutils.command` 包中进行。 但是当 :file:`setup.py` 附带 ``--command-packages "
145+
"distcmds,buildcmds`` 选项运行时,:mod:`distutils.command`, :mod:`distcmds` 和 "
146+
":mod:`buildcmds` 包将按此顺序被查找。 新的命令应当在与命名同名的模块中由同名的类来实现。 给定上述示例命令行选项,则命令 "
147+
":command:`bdist_openpkg` 可由类 :class:`distcmds.bdist_openpkg.bdist_openpkg` 或"
148+
" :class:`buildcmds.bdist_openpkg.bdist_openpkg` 来实现。"
137149

138150
#: ../../distutils/extending.rst:90
139151
msgid "Adding new distribution types"

reference/datamodel.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,6 +2228,8 @@ msgid ""
22282228
"the attribute was accessed through, or ``None`` when the attribute is "
22292229
"accessed through the *owner*."
22302230
msgstr ""
2231+
"调用此方法以获取所有者类的属性(类属性访问)或该类的实例的属性(实例属性访问)。 可选的 *owner* 参数是所有者类而 *instance* "
2232+
"是被用来访问属性的实例,如果通过 *owner* 来访问属性则返回 ``None``。"
22312233

22322234
#: ../../reference/datamodel.rst:1629
22332235
msgid ""
@@ -2244,6 +2246,9 @@ msgid ""
22442246
"implementation always passes in both arguments whether they are required or "
22452247
"not."
22462248
msgstr ""
2249+
":PEP:`252` 指明 :meth:`__get__` 为带有一至二个参数的可调用对象。 Python "
2250+
"自身内置的描述器支持此规格定义;但是,某些第三方工具可能要求必须带两个参数。 Python 自身的 :meth:`__getattribute__` "
2251+
"实现总是会传入两个参数,无论它们是否被要求提供。"
22472252

22482253
#: ../../reference/datamodel.rst:1641
22492254
msgid ""
@@ -2257,6 +2262,8 @@ msgid ""
22572262
"descriptor to a \"data descriptor\". See :ref:`descriptor-invocation` for "
22582263
"more details."
22592264
msgstr ""
2265+
"请注意,添加 :meth:`__set__` 或 :meth:`__delete__` 会将描述器变成“数据描述器”。 更多细节请参阅 :ref"
2266+
":`descriptor-invocation`。"
22602267

22612268
#: ../../reference/datamodel.rst:1650
22622269
msgid ""
@@ -2780,6 +2787,9 @@ msgid ""
27802787
"initialised correctly. Failing to do so will result in a :exc:`RuntimeError`"
27812788
" in Python 3.8."
27822789
msgstr ""
2790+
"在 CPython 3.6 及之后的版本中,``__class__`` 单元会作为类命名空间中的cell is passed to the "
2791+
"metaclass as a ``__classcell__`` 条目被传给元类。 如果存在,它必须被向上传播给 ``type.__new__`` "
2792+
"调用,以便能正确地初始化该类。 如果不这样做,在 Python 3.8 中将引发 :exc:`RuntimeError`。"
27832793

27842794
#: ../../reference/datamodel.rst:1990
27852795
msgid ""
@@ -3292,6 +3302,8 @@ msgid ""
32923302
"defined then corresponding built-in functions :func:`int`, :func:`float` and"
32933303
" :func:`complex` fall back to :meth:`__index__`."
32943304
msgstr ""
3305+
"如果未定义 :meth:`__int__`, :meth:`__float__` 和 :meth:`__complex__` 则相应的内置函数 "
3306+
":func:`int`, :func:`float` 和 :func:`complex` 将回退为 :meth:`__index__`。"
32953307

32963308
#: ../../reference/datamodel.rst:2422
32973309
msgid ""

0 commit comments

Comments
 (0)