expr++ expr--
++expr --expr +expr -expr ~ !
* / %
+ -
<< >> >>>
< > <= >= instanceof
== !=
&
^
|
&&
||
? :
= += -= *= /= %= &= ^= |= <<= >>= >>>=
::
++
--
()
[]
.
−>
+
−
!
~
(type)
*
sizeof
new
new[]
delete
delete[]
.*
->*
/
%
<<
>>
<
<=
>
>=
==
!=
?:
=
+=
−=
*=
/=
%=
<<=
>>=
&=
^=
|=
throw
,
(type){list}
_Alignof
clone new
[
++ --
~ - (int) (float) (string) (array) (object) (bool) @
instanceof
+ - .
<< >>
< <= > >= <>
== != === !==
= += -= *= /= .= %= &= |= ^= <<= >>=
and
xor
or
这个表给出Python的运算符优先级(从低到高).
从最低的优先级(最松散地结合)到最高的优先级(最紧密地结合)。
这意味着在一个表达式中,Python会首先计算表中较下面的运算符,然后在计算列在表上部的运算符。
lambda
not x
in,not in
is,is not
<,<=,>,>=,!=,==
<<,>>
+,-
*,/,%
+x,-x
~x
**
x.attribute
x[index]
x[index:index]
f(arguments...)
(experession,...)
[expression,...]
{key:datum,...}
'expression,...'