◐ Shell
clean mode source ↗

Message 173259 - Python tracker

No, that's expected behaviour.

1j is complex(0.0, 1.0)
-1j is complex(-0.0, -1.0)

so -1j.real is -0.0.  There's not really any other sensible way to handle this.

The complex-from-string constructor, on the other hand, is more careful about interpreting signs.