Message137226
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 |
|
Date |
User |
Action |
Args |
2011-05-29 23:02:30 | umedoblock | set | recipients:
+ umedoblock |
2011-05-29 23:02:30 | umedoblock | set | messageid: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> |
2011-05-29 23:02:29 | umedoblock | link | issue12211 messages |
2011-05-29 23:02:29 | umedoblock | create | |
|