[issue6044] Exception message in int() when trying to convert a complex

Mark Dickinson report at bugs.python.org
Sun May 17 11:49:31 CEST 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

I always found the "use int(abs(z))" part of that message odd,
as well.  As Georg points out, there are many possible ways that
one might want to convert complex to int;  it seems strange to
give advice for one particular one when that may well not match
what the user wanted.

I'd suggest just dropping the "use int(abs(z))" from the error message.
I think it's more likely to be confusing than helpful.

The same applies to float(complex).

----------
nosy: +marketdickinson

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


More information about the Python-bugs-list mailing list