Author mark.dickinson
Recipients Ananthakrishnan, SilentGhost, mark.dickinson, rhettinger, serhiy.storchaka, steven.daprano, tim.peters
Date 2020-02-16.17:12:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581873165.13.0.111239909804.issue39648@roundup.psfhosted.org>
In-reply-to
Content
> Should it take variable number of positional arguments or a single iterable argument as max() and min()?

Good question: the obvious extension to the current function would be to allow it to take multiple scalar arguments. But I don't much like the mismatch that introduces with `sum` and `math.prod`, which accept a single iterable argument.

I *definitely* don't want to give `gcd` a combination API like the one `min` and `max` have.

> What should it return for 0 arguments?

That one's easy. It should return `0`. `0` is an identity for the binary `gcd` operation, and mathematically, the `gcd` is defined for *any* set of integers (finite or infinite), including the empty set. The gcd of the empty set is zero.
History
Date User Action Args
2020-02-16 17:12:45mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, steven.daprano, SilentGhost, serhiy.storchaka, Ananthakrishnan
2020-02-16 17:12:45mark.dickinsonsetmessageid: <1581873165.13.0.111239909804.issue39648@roundup.psfhosted.org>
2020-02-16 17:12:45mark.dickinsonlinkissue39648 messages
2020-02-16 17:12:45mark.dickinsoncreate