Message232523
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. |
|
Date |
User |
Action |
Args |
2014-12-12 11:12:36 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, mark.dickinson, belopolsky, pitrou, scoder, vstinner, wolma, gladman |
2014-12-12 11:12:36 | serhiy.storchaka | set | messageid: <1418382756.32.0.286469693048.issue22486@psf.upfronthosting.co.za> |
2014-12-12 11:12:36 | serhiy.storchaka | link | issue22486 messages |
2014-12-12 11:12:35 | serhiy.storchaka | create | |
|