Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'hettinger': 0.07; 'decision.': 0.09; 'deprecated': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rejected': 0.09; 'shame': 0.09; 'python': 0.11; 'bug': 0.12; 'anyway': 0.14; 'language.': 0.14; 'backward': 0.16; 'backwards': 0.16; 'chip': 0.16; 'correctness': 0.16; 'feasible': 0.16; 'happily': 0.16; 'lurking': 0.16; 'maintainers': 0.16; 'naming': 0.16; 'rationale': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'renaming': 0.16; 'simplest': 0.16; 'tracker,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'module': 0.19; 'any,': 0.19; 'mechanism': 0.19; 'stefan': 0.19; 'seems': 0.21; '>>>': 0.22; 'code,': 0.22; 'example': 0.22; 'header:User-Agent:1': 0.23; 'mathematical': 0.24; 'helpful': 0.24; 'developers': 0.25; 'least': 0.26; 'certain': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'patch': 0.29; 'properties': 0.29; 'raise': 0.29; 'raymond': 0.30; "i'm": 0.30; 'gives': 0.31; '>>>>': 0.31; 'anyone': 0.31; 'probably': 0.32; 'url:python': 0.33; 'guess': 0.33; "i'd": 0.34; 'knowledge': 0.35; 'done.': 0.35; 'test': 0.35; 'but': 0.35; 'there': 0.35; 'module.': 0.36; 'url:org': 0.36; 'behind': 0.37; 'level': 0.37; 'expected': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'enough': 0.39; 'received:org': 0.40; 'negative': 0.60; 'first': 0.61; 'such': 0.63; 'our': 0.64; 'provide': 0.64; 'charset:windows-1252': 0.65; 'here': 0.66; 'contact': 0.67; 'debate': 0.68; '3.6': 0.84; 'action.': 0.84; 'brick': 0.84; 'comment.': 0.84; 'irrelevant': 0.84; 'maths': 0.84; 'unclear': 0.84; 'luck': 0.93; 'enhancement': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: GCD in Fractions Date: Tue, 23 Sep 2014 23:52:54 +0100 References: <54216c8e$0$29966$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-22-80-36.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1411512796 news.xs4all.nl 2958 [2001:888:2000:d::a6]:34490 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78258 On 23/09/2014 22:48, blindanagram wrote: > 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. > From https://docs.python.org/devguide/experts.html Mark Dickinson and Raymond Hettinger are listed as the maintainers of the fractions module. If they're not lurking here I'd guess the simplest way to contact them is via the bug tracker. That also gives the official mechanism as to whether or not an enhancement request such as this is accepted or rejected and the rationale behind the decision. For example it is feasible that the current behaviour would be deprecated in Python 3.5 and changed in 3.6 to match your needs. I don't have enough knowledge of the maths to say one way or another, but I'm certain that others will chip in with their comments. Best of luck anyway :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence