Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e120e8

Browse files
[po] auto sync
1 parent9263f0e commit6e120e8

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

‎.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation":"81.70%","updated_at":"2025-04-28T14:57:27Z"}
1+
{"translation":"81.71%","updated_at":"2025-04-29T01:19:40Z"}

‎whatsnew/3.3.po

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,11 @@ msgid ""
11501150
"writing decorators and any code that validates or amends calling signatures "
11511151
"or arguments."
11521152
msgstr""
1153+
"新增的函数 :func:`inspect.signature` 使得对 python 可调用对象的内省更为简单直观。 "
1154+
"多种可调用对象均受到支持:不论是否带装饰器的 python 函数,类以及 :func:`functools.partial` 对象。 新增的类 "
1155+
":class:`inspect.Signature`, :class:`inspect.Parameter` 和 "
1156+
":class:`inspect.BoundArguments` "
1157+
"保存了有关调用签名的信息,如标注、默认值、形参类别和绑定参数等,这极大地简化了编写装饰器和其他任何验证或修改调用签名或参数的工作。"
11531158

11541159
#:../../whatsnew/3.3.rst:643
11551160
msgid":pep:`362`: - Function Signature Object"
@@ -1174,6 +1179,8 @@ msgid ""
11741179
"attributes on :data:`sys.implementation` are ``name``, ``version``, "
11751180
"``hexversion``, and ``cache_tag``."
11761181
msgstr""
1182+
"新增的 :mod:`sys` 模块属性将对外公开当前运行的解释器实现的专属细节。 :data:`sys.implementation` "
1183+
"上的初始属性集合包括 ``name``, ``version``, ``hexversion`` 和 ``cache_tag``。"
11771184

11781185
#:../../whatsnew/3.3.rst:656
11791186
msgid""
@@ -1184,6 +1191,9 @@ msgid ""
11841191
"only a small portion of the implementation-specific data. Over time that "
11851192
"ratio will shift in order to make the standard library more portable."
11861193
msgstr""
1194+
"``sys.implementation`` 的目的是将标准库所使用的具体实现专属数据合并到一个命名空间中。 这允许不同的 Python "
1195+
"实现能更方便地共享同一个标准库基准代码。 在其初始状态中,``sys.implementation`` 只保持具体实现专属数据的一小部分。 "
1196+
"随着时间推移这个比例将进行调整以使标准库具有更好的可移植性。"
11871197

11881198
#:../../whatsnew/3.3.rst:663
11891199
msgid""
@@ -1193,10 +1203,14 @@ msgid ""
11931203
"``importlib`` for its built-in import system may use ``cache_tag`` to "
11941204
"control the caching behavior for modules."
11951205
msgstr""
1206+
"标准库可移植性提高的一个例子是 ``cache_tag``。 在 Python 3.3 "
1207+
"中,``sys.implementation.cache_tag`` 被 :mod:`importlib` 用来支持与 :pep:`3147` "
1208+
"的一致性。 任何使用 ``importlib`` 来处理内置导入系统的 Python 实现都可使用 ``cache_tag`` "
1209+
"来控制各个模块的缓存行为。"
11961210

11971211
#:../../whatsnew/3.3.rst:670
11981212
msgid"SimpleNamespace"
1199-
msgstr""
1213+
msgstr"SimpleNamespace"
12001214

12011215
#:../../whatsnew/3.3.rst:672
12021216
msgid""
@@ -1207,6 +1221,10 @@ msgid ""
12071221
"are writable. This means that you can add, remove, and modify the namespace"
12081222
" through normal attribute access."
12091223
msgstr""
1224+
"``sys.implementation`` 的实现还为 Python 引入了一个新类型: "
1225+
":class:`types.SimpleNamespace`。 相比基于映射的命名空间像是 "
1226+
":class:`dict`,``SimpleNamespace`` 是基于属性的,像是 :class:`object`。 不过,与 ``object``"
1227+
" 不同,``SimpleNamespace`` 实例是可写的。 这意味着你可以通过常规的属性访问来添加、移除和修改命名空间。"
12101228

12111229
#:../../whatsnew/3.3.rst:681
12121230
msgid":pep:`421` - Adding sys.implementation"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp