Mark Dickinson <dicki...@gmail.com> added the comment:

Great. For clarity, here's a Python function giving the behaviour I'd expect 
from a 2-arg lcm:

    from math import gcd

    def lcm(a, b):
        if a == 0:
            return 0
        return abs(a // gcd(a, b) * b)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39479>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to