[New-bugs-announce] [issue6044] Exception message in int() when trying to convert a complex

aletornw report at bugs.python.org
Sun May 17 05:18:01 CEST 2009


New submission from aletornw <aletornw.spam at gmail.com>:

Hi, I noticed that when trying to convert with the int() function a
complex number the exception error says "use int(abs(z))". I think that
insted it should say "use int(z.real)" because if I want to convert
1j**2 to int using the abs method, the result is 1 positive, when it
should be -1. With my method it works fine.

----------
messages: 87955
nosy: aletornw
severity: normal
status: open
title: Exception message in int() when trying to convert a complex
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6044>
_______________________________________


More information about the New-bugs-announce mailing list