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 serhiy.storchaka
Recipients belopolsky, gladman, mark.dickinson, pitrou, scoder, serhiy.storchaka, vstinner, wolma
Date 2014-12-12.11:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418382756.32.0.286469693048.issue22486@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a patch which addresses both Mark's suggestions.

* math.gcd() now work with arbitrary Python objects implementing __index__.
* fractions.gcd() and Fraction's constructor now use math.gcd() if both arguments are int, but also support non-ints (e.g. Fractions or floats).
* fractions.gcd() now is deprecated.

But before committing I want to experiment with simpler implementation and compare it with current complex implementation. If the difference will be not too large, we could use simpler implementation.
History
Date User Action Args
2014-12-12 11:12:36serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, belopolsky, pitrou, scoder, vstinner, wolma, gladman
2014-12-12 11:12:36serhiy.storchakasetmessageid: <1418382756.32.0.286469693048.issue22486@psf.upfronthosting.co.za>
2014-12-12 11:12:36serhiy.storchakalinkissue22486 messages
2014-12-12 11:12:35serhiy.storchakacreate