Why python 2: negative number cannot be raised to a fractional power, but work on Python 3

問題是這個樣子的 [crayon-60f98ff789dda662722285/] 為什麼會有 Python 2 不能運算 (-1) ** .5 而 Python 3 可以的狀況?直覺想就是 Python 2 的 integer __pow__ 並沒有支援 pow 運算轉型為 Complex,而在 Python 3 中會轉行為 Complex。但是要怎麼驗證這個行為? 編譯 CPython 並且使用 … 閱讀全文 Why python 2: negative number cannot be raised to a fractional power, but work on Python 3