File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- {"translation" : " 92.30 %" , "updated_at" : " 2023-11-17T02:07:55Z " }
1+ {"translation" : " 92.31 %" , "updated_at" : " 2023-11-17T02:55:44Z " }
Original file line number Diff line number Diff line change @@ -2965,10 +2965,12 @@ msgid ""
29652965"does not, in fact, override anything. This helps prevent bugs that may occur"
29662966" when a base class is changed without an equivalent change to a child class."
29672967msgstr ""
2968+ "如果一个以 ``@override`` 装饰的方法实际未重载任何东西则类型检查器应当报告错误。 "
2969+ "这有助于防止当基类发生修改而子类未进行相应修改而导致的问题。"
29682970
29692971#: ../../library/typing.rst:2908
29702972msgid "There is no runtime checking of this property."
2971- msgstr ""
2973+ msgstr "没有对此特征属性的运行时检查。 "
29722974
29732975#: ../../library/typing.rst:2910
29742976msgid ""
@@ -2979,6 +2981,9 @@ msgid ""
29792981" not support setting attributes, the decorator returns the object unchanged "
29802982"without raising an exception."
29812983msgstr ""
2984+ "该装饰器将尝试在被装饰的对象上设置 ``__override__`` 属性为 ``True``。 这样,可以在运行时使用 ``if "
2985+ "getattr(obj, \" __override__\" , False)`` 这样的检查来确定对象 ``obj`` 是否已被标记为重载。 "
2986+ "如果被装饰的对象不支持设置属性,该装饰器将不加修改地返回对象而不会引发异常。"
29822987
29832988#: ../../library/typing.rst:2917
29842989msgid "See :pep:`698` for more details."
You can’t perform that action at this time.
0 commit comments