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 mark.dickinson
Recipients gladman, mark.dickinson, pitrou, scoder, serhiy.storchaka, wolma
Date 2014-09-26.17:28:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411752485.95.0.976663336327.issue22486@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-09-26 17:28:05mark.dickinsonsetrecipients: + mark.dickinson, pitrou, scoder, serhiy.storchaka, wolma, gladman
2014-09-26 17:28:05mark.dickinsonsetmessageid: <1411752485.95.0.976663336327.issue22486@psf.upfronthosting.co.za>
2014-09-26 17:28:05mark.dickinsonlinkissue22486 messages
2014-09-26 17:28:05mark.dickinsoncreate