Message227637
To avoid regressions, please can we leave the old `fractions.gcd` exactly as it was?
For example, the current `fractions.gcd` *does* work for Fraction instances [1]. That's certainly not its intended use, but I wouldn't be surprised if there's code out there that uses it in that way. It also just happens to work for nonnegative finite float inputs, because a % b gives exact results when a and b are positive floats, so no error is introduced at any point.
I'd also worry about breaking existing uses involving integer-like objects (instances of numpy.int64, for example) in place of instances of ints.
[1] By "works", I mean that if a and b are Fractions then gcd(a, b) returns a Fraction such that (1) a and b are integer multiples of gcd(a, b), and (2) gcd(a, b) is an integer multiple of any other number with this property. |
|
Date |
User |
Action |
Args |
2014-09-26 17:28:05 | mark.dickinson | set | recipients:
+ mark.dickinson, pitrou, scoder, serhiy.storchaka, wolma, gladman |
2014-09-26 17:28:05 | mark.dickinson | set | messageid: <1411752485.95.0.976663336327.issue22486@psf.upfronthosting.co.za> |
2014-09-26 17:28:05 | mark.dickinson | link | issue22486 messages |
2014-09-26 17:28:05 | mark.dickinson | create | |
|