Message227443
I suggest adding a new implementation instead of replacing the current function in the fractions module. As Mark noted, the current gcd() is more of a sideeffect of the fractions module, but there's no real need to change that. It works perfectly ok for a) the Fraction type and b) positive input values.
Even if there's no other module namespace for this functionality that is more suitable than fractions, it could still be added under a different name, say, absgcd() or whatever. Something that makes it clear(er) how negative input is handled. The mere name "gcd" isn't very telling on that front. |
|
Date |
User |
Action |
Args |
2014-09-24 11:41:04 | scoder | set | recipients:
+ scoder, mark.dickinson, vstinner, gladman, brg@gladman.plus.com |
2014-09-24 11:41:03 | scoder | set | messageid: <1411558863.94.0.757378602381.issue22477@psf.upfronthosting.co.za> |
2014-09-24 11:41:03 | scoder | link | issue22477 messages |
2014-09-24 11:41:03 | scoder | create | |
|