@@ -813,6 +813,8 @@ msgid ""
813813"elements. Permitted key expressions are restricted as described in the match"
814814" statement documentation."
815815msgstr ""
816+ "一个匹配的映射模式。 ``keys`` 为一个由表达式节点组成的序列。 ``patterns`` 为一个由对应的模式节点组成的序列。 ``rest`` "
817+ "是一个可被指定用来捕获剩余映射元素的可选名称。 允许的关键字表达式被限制为与 match 语句文档中所描述的一致。"
816818
817819#: ../../library/ast.rst:1440
818820msgid ""
@@ -822,6 +824,8 @@ msgid ""
822824"dict containing the remaining mapping elements is bound to that name if the "
823825"overall mapping pattern is successful."
824826msgstr ""
827+ "如果目标为一个映射、所有被求值的表达式都存在于该映射中,并且对应于每个键的值都与对应的子模式相匹配则此模式匹配成功。 如果 ``rest`` 不为 "
828+ "``None``,则当整个映射模式匹配成功时会将一个包含剩余映射元素的字典绑定到该名称。"
825829
826830#: ../../library/ast.rst:1480
827831msgid ""
@@ -833,20 +837,25 @@ msgid ""
833837"the corresponding patterns (specified as keyword values in the class "
834838"pattern)."
835839msgstr ""
840+ "一个 match 类模式。 ``cls`` 为一个给出要匹配的名义类的表达式。 ``patterns`` "
841+ "为一个由要与该类所定义的模式匹配属性相匹配的模式节点组成的序列。 ``kwd_attrs`` "
842+ "为一个由要匹配的附加属性(指定为该类模式中的关键字参数)组成的序列,``kwd_patterns`` 为对应的模式(指定为该类模式中的关键字值)。"
836843
837844#: ../../library/ast.rst:1487
838845msgid ""
839846"This pattern succeeds if the subject is an instance of the nominated class, "
840847"all positional patterns match the corresponding class-defined attributes, "
841848"and any specified keyword attributes match their corresponding pattern."
842- msgstr ""
849+ msgstr "如果目标为被指名类的一个实例、所有的位置模式都与对应的类定义属性相匹配,并且任何被指定的关键字属性都与其对应的模式相匹配则此模式匹配成功。 "
843850
844851#: ../../library/ast.rst:1491
845852msgid ""
846853"Note: classes may define a property that returns self in order to match a "
847854"pattern node against the instance being matched. Several builtin types are "
848855"also matched that way, as described in the match statement documentation."
849856msgstr ""
857+ "注意:类可能会定义一个返回自身的特征属性以便能将一个模式节点与被匹配的实例相匹配。 某些内置类型也是以这种方式来匹配的,与 match "
858+ "语句文档中所描述的一致。"
850859
851860#: ../../library/ast.rst:1544
852861msgid ""
@@ -855,13 +864,17 @@ msgid ""
855864"pattern is ``None``, the node represents a capture pattern (i.e a bare name)"
856865" and will always succeed."
857866msgstr ""
867+ "一个匹配 \" as-模式\" 、捕获模式或通配符模式。 ``pattern`` 包含将要与目标相匹配的匹配模式。 如果模式为 "
868+ "``None``,则该节点代表一个捕获模式(即一个简单的名称)并将总是会成功。"
858869
859870#: ../../library/ast.rst:1549
860871msgid ""
861872"The ``name`` attribute contains the name that will be bound if the pattern "
862873"is successful. If ``name`` is ``None``, ``pattern`` must also be ``None`` "
863874"and the node represents the wildcard pattern."
864875msgstr ""
876+ "``name`` 属性包含当模式匹配成功时将要绑定的名称。 如果 ``name`` 为 ``None``,则 ``pattern`` 也必须为 "
877+ "``None`` 并且该节点代表的是通配符模式。"
865878
866879#: ../../library/ast.rst:1585
867880msgid ""
@@ -871,14 +884,16 @@ msgid ""
871884"``patterns`` attribute contains a list of match pattern nodes that will be "
872885"matched against the subject."
873886msgstr ""
887+ "一个匹配 \" or-模式\" 。 or-模式会依次将其每个子模式与目标相匹配,直到有一个匹配成功。 此时该 or-模式将被视为匹配成功。 "
888+ "如果没有一个子模式匹配成功则该 or-模式匹配失败。 ``patterns`` 属性包含一个由将与目标相匹配的匹配模式节点组成的列表。"
874889
875890#: ../../library/ast.rst:1617
876891msgid "Function and class definitions"
877- msgstr ""
892+ msgstr "函数与类定义 "
878893
879894#: ../../library/ast.rst:1621
880895msgid "A function definition."
881- msgstr ""
896+ msgstr "一个函数定义。 "
882897
883898#: ../../library/ast.rst:1623
884899msgid "``name`` is a raw string of the function name."
0 commit comments