Author mark.dickinson
Recipients Ananthakrishnan, BernardoSulzbach, Dennis Sweeney, SilentGhost, mark.dickinson, rhettinger, serhiy.storchaka, steven.daprano, tim.peters
Date 2020-02-20.18:49:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582224576.03.0.913229484536.issue39648@roundup.psfhosted.org>
In-reply-to
Content
@Ananthakrishnan: Sure, go ahead.

Let's make the process a bit more streamlined than last time around: see if you can put together a PR that passes all the CI checks before asking for review. If you get stuck, make a work-in-progress PR and ask for help in a comment on that PR rather than via email.

A couple of pointers:

- Take a look at the existing math.hypot implementation to see how to deal with multiple arguments. (Note that argument clinic doesn't currently work for *args functions.)

- For the first working version, don't bother making special cases for the zero-argument or one-argument gcd (or even the case of two arguments). You just want the equivalent of the following Python code, which is perfectly general:

    def gcd(*args):
        g = 0
        for arg in args:
            g = gcd_2arg(g, operator.index(arg))
        return g

where gcd_2arg is the original 2-argument gcd (in C, _PyLong_GCD). We can always optimise later.
History
Date User Action Args
2020-02-20 18:49:36mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, steven.daprano, SilentGhost, serhiy.storchaka, Dennis Sweeney, Ananthakrishnan, BernardoSulzbach
2020-02-20 18:49:36mark.dickinsonsetmessageid: <1582224576.03.0.913229484536.issue39648@roundup.psfhosted.org>
2020-02-20 18:49:36mark.dickinsonlinkissue39648 messages
2020-02-20 18:49:35mark.dickinsoncreate