Mark Dickinson <dicki...@gmail.com> added the comment:
> 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39648> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com