中括号内的表达式看起来很熟悉。
方括号内的表达式是一个元组。我们可以用元组赋值语句来遍历这个字典。
The expression in brackets is a tuple. We could use tuple assignment to traverse this dictionary.
此外,星号可以用于作为通配符来匹配多个节点,括号内的表达式可以用于匹配属性值和规定索引。
In addition, asterisks can be used as wildcards to match multiple nodes, and bracketed expressions can be used to match attribute values and specify indices.
所有括号内的子表达式都求值完毕后,表达式的其它部分再求值。
When all parenthetical subexpressions have been evaluated, the rest of the expression is evaluated.
括号内的内容最优先,大家可以用括号来强制某系表达式有限计算。
Parentheses have the highest precedence and can be used to force an expression to evaluate in the order you want.
方括号内的任意表达式(包括简单的标识符)都可以作为该属性的索引。
An arbitrary expression, including a simple identifier, inside square brackets can index the property.
方括号内的任意表达式(包括简单的标识符)都可以作为该属性的索引。
An arbitrary expression, including a simple identifier, inside square brackets can index the property.
应用推荐