GCD in Fractions

blindanagram noone at nowhere.net
Tue Sep 23 17:48:26 EDT 2014


On 23/09/2014 20:30, Mark Lawrence wrote:
> On 23/09/2014 18:43, blindanagram wrote:
>> On 23/09/2014 18:26, Stefan Behnel wrote:
>>> Wolfgang Maier schrieb am 23.09.2014 um 18:38:
>>>> While at first I thought this to be a rather irrelevant debate over
>>>> module
>>>> private vs public naming conventions, I now think the OP is probably
>>>> right
>>>> and renaming fractions.gcd to fractions._gcd may be a good idea.
>>> For negative numbers, the "expected" behaviour seems to be unclear,
>>> so the
>>> current behaviour is just as good as any, so backwards compatibility
>>> concerns clearly win this fight.
>>
>> The expected behaviour is not unclear for anyone who takes the
>> mathematical properties of the GCD seriously.  It's a shame that Python
>> doesn't.
>>
> All you need do is raise an issue on the bug tracker, provide a patch to
> code, test and docs and the job is done.

Thank you for your helpful comment.  I will happily do this if after
discussion here there is a reasonable level of support and encouragement
for such an action.

However, there is at least one person here who takes the view that
backward compatibility outranks mathematical correctness and I don't
want to find that 'I am banging my head against a brick wall' if this is
likely to be the stance that Python developers take.




More information about the Python-list mailing list