这很奇怪。看起来 python 将其解释为 (1+1)j.imag,但为什么呢?不应该是 1+(1j).imag 或者 (1+1j).imag 吗?
请您参考如下方法:
它将其解释为 1+(1j.imag),因为 attribute access has a higher precedence than addition .
这很奇怪。看起来 python 将其解释为 (1+1)j.imag,但为什么呢?不应该是 1+(1j).imag 或者 (1+1j).imag 吗?
请您参考如下方法:
它将其解释为 1+(1j.imag),因为 attribute access has a higher precedence than addition .