the python name
Chris Angelico
rosuav at gmail.com
Sat Jan 5 17:42:46 EST 2019
On Sun, Jan 6, 2019 at 9:34 AM Avi Gross <avigross at verizon.net> wrote:
> I recall an example from a version of mathematical LISP that I will rewrite
> in python for illustration:
>
> def is_greater(left, right):
> if left <= 0 : return False
> if right <= 0 : return True
> return is_greater(left - 1, right - 1)
Possibly:
if left <= 0: return is_greater(-right, -left)
Otherwise it will give incorrect results for, eg, is_greater(-10, -11)
But your point is taken.
ChrisA
More information about the Python-list
mailing list