[issue12211] math.copysign must keep object type.

umedoblock report at bugs.python.org
Sat Jun 4 08:28:06 CEST 2011


umedoblock <umedoblock at gmail.com> added the comment:

abs() behavior show below.
>>> type(abs(-1))
<class 'int'>
>>> type(abs(-1.0))
<class 'float'>

we should fix this problem if write
"Return abs(x) with the sign of y"

I'd like to try this problem if need fix.
I'm going to attach the patch.

----------

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


More information about the Python-bugs-list mailing list