Georg Brandl <ge...@python.org> added the comment: That no unambiguous conversion between complex and int is defined is exactly the reason for this error message. You could want the absolute value, the real part, the imaginary part, or even the polar angle...
int(abs(z)) works as intended, giving you the absolute value of the complex number, which is 1 for 1j**2. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6044> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com