This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author georg.brandl
Recipients aletornw, georg.brandl
Date 2009-05-17.09:21:05
SpamBayes Score 2.0341593e-05
Marked as misclassified No
Message-id <1242552067.21.0.0780606978428.issue6044@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-05-17 09:21:07georg.brandlsetrecipients: + georg.brandl, aletornw
2009-05-17 09:21:07georg.brandlsetmessageid: <1242552067.21.0.0780606978428.issue6044@psf.upfronthosting.co.za>
2009-05-17 09:21:05georg.brandllinkissue6044 messages
2009-05-17 09:21:05georg.brandlcreate