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

Skip to content

Commit 6793f30

Browse files
[po] auto sync
1 parent 80156c6 commit 6793f30

File tree

12 files changed

+1349
-357
lines changed

12 files changed

+1349
-357
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "80.68%", "updated_at": "2024-12-26T02:10:03Z"}
1+
{"translation": "80.94%", "updated_at": "2024-12-27T17:46:20Z"}

howto/descriptor.po

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-12-06 14:52+0000\n"
14+
"POT-Creation-Date: 2024-12-27 14:52+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -1064,6 +1064,14 @@ msgid ""
10641064
" raise\n"
10651065
" return type(obj).__getattr__(obj, name) # __getattr__"
10661066
msgstr ""
1067+
"def getattr_hook(obj, name):\n"
1068+
" \"Emulate slot_tp_getattr_hook() in Objects/typeobject.c\"\n"
1069+
" try:\n"
1070+
" return obj.__getattribute__(name)\n"
1071+
" except AttributeError:\n"
1072+
" if not hasattr(type(obj), '__getattr__'):\n"
1073+
" raise\n"
1074+
" return type(obj).__getattr__(obj, name) # __getattr__"
10671075

10681076
#: ../../howto/descriptor.rst:773
10691077
msgid "Invocation from a class"
@@ -1076,6 +1084,9 @@ msgid ""
10761084
":meth:`!object.__getattribute__` but the instance dictionary lookup is "
10771085
"replaced by a search through the class's :term:`method resolution order`."
10781086
msgstr ""
1087+
"像 ``A.x`` 这样的点操作符查找的逻辑在 :meth:`!type.__getattribute__` 中。 其步骤与 "
1088+
":meth:`!object.__getattribute__` 相似,但是实例字典查找被替换为搜索类的 :term:`method "
1089+
"resolution order`。"
10791090

10801091
#: ../../howto/descriptor.rst:780
10811092
msgid ""
@@ -1100,6 +1111,7 @@ msgid ""
11001111
":meth:`~object.__getattribute__` method for object returned by "
11011112
":func:`super`."
11021113
msgstr ""
1114+
"super 的点操作符查找的逻辑在 :func:`super` 所返回对象的 :meth:`~object.__getattribute__` 方法中。"
11031115

11041116
#: ../../howto/descriptor.rst:792
11051117
msgid ""
@@ -1133,6 +1145,8 @@ msgid ""
11331145
":meth:`~object.__getattribute__` methods for :class:`object`, :class:`type`,"
11341146
" and :func:`super`."
11351147
msgstr ""
1148+
"描述器的机制嵌入在 :class:`object`, :class:`type` 和 :func:`super` 的 "
1149+
":meth:`~object.__getattribute__` 方法中。"
11361150

11371151
#: ../../howto/descriptor.rst:809
11381152
msgid "The important points to remember are:"
@@ -1141,7 +1155,7 @@ msgstr "要记住的重要点是:"
11411155
#: ../../howto/descriptor.rst:811
11421156
msgid ""
11431157
"Descriptors are invoked by the :meth:`~object.__getattribute__` method."
1144-
msgstr ""
1158+
msgstr "描述器将由 :meth:`~object.__getattribute__` 方法发起调用。"
11451159

11461160
#: ../../howto/descriptor.rst:813
11471161
msgid ""
@@ -1153,7 +1167,7 @@ msgstr "类从 :class:`object`,:class:`type` 或 :func:`super` 继承此机制
11531167
msgid ""
11541168
"Overriding :meth:`~object.__getattribute__` prevents automatic descriptor "
11551169
"calls because all the descriptor logic is in that method."
1156-
msgstr ""
1170+
msgstr "重写 :meth:`~object.__getattribute__` 将阻止自动的描述器调用因为所有描述器逻辑都在该方法中。"
11571171

11581172
#: ../../howto/descriptor.rst:819
11591173
msgid ""
@@ -1162,6 +1176,8 @@ msgid ""
11621176
" and may include the class. The second puts in ``None`` for the instance "
11631177
"and always includes the class."
11641178
msgstr ""
1179+
":meth:`!object.__getattribute__` 和 :meth:`!type.__getattribute__` 会用不同方式调用 "
1180+
":meth:`~object.__get__`。 第一个会包括实例并可能包括类 。第二个会将 ``None`` 作为实例并且总是包括类。"
11651181

11661182
#: ../../howto/descriptor.rst:824
11671183
msgid "Data descriptors always override instance dictionaries."
@@ -1495,7 +1511,7 @@ msgstr ""
14951511
msgid ""
14961512
"Either the built-in :func:`property` or our :func:`!Property` equivalent "
14971513
"would work in this example."
1498-
msgstr ""
1514+
msgstr "在这个例子中内置的 :func:`property` 或我们的 :func:`!Property` 等价实现都是可以的。"
14991515

15001516
#: ../../howto/descriptor.rst:1158
15011517
msgid "Functions and methods"

0 commit comments

Comments
 (0)