[issue39648] Update math.gcd() to accept "n" arguments.

Serhiy Storchaka report at bugs.python.org
Sun Feb 16 12:08:16 EST 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Python as programming language provides builtin blocks. This is a good example of using functools.reduce().

But if you can provide an algorithm for calculating the GCD and LCM more efficient than sequential applying gcd() and lcm() for two arguments, it would be an argument for implementing it in the stdlib.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39648>
_______________________________________


More information about the Python-bugs-list mailing list