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 umedoblock
Recipients umedoblock
Date 2011-05-29.23:02:29
SpamBayes Score 1.7070815e-07
Marked as misclassified No
Message-id <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za>
In-reply-to
Content
I expected return int if I gave x as integer to copysign.

I encounterd two problems.
I'd like to fix this problems.
but I can't come up with nice idea.
therefore I just report for you.

one:
>>> import math
>>> a = [0, 1, 2, 3]
>>> i = 1
>>> i_copysign = math.copysign(i, -1)
>>> a[i_copysign]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers, not float

two:
>>> n = 10 ** 20
>>> math.copysign(n + 1, 1) == n + 1
False
History
Date User Action Args
2011-05-29 23:02:30umedoblocksetrecipients: + umedoblock
2011-05-29 23:02:30umedoblocksetmessageid: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za>
2011-05-29 23:02:29umedoblocklinkissue12211 messages
2011-05-29 23:02:29umedoblockcreate