[sage-devel] presentation about Maxima at Sage developer days



You could get the python code even shorter if you really wanted to, but I
think it is most readable in the original version:

def compare(a, b, x):
   c = limitinf(log(a)/log(b), x)
   return '=' if c == 0 else ('>' if c in [oo, -oo] else '=')

Well, you can make the Python code above shorter too:
>
> def compare(a, b, x):
>    c = limitinf(log(a)/log(b), x)
>    if c == 0: return "<"
>    elif c in [oo, -oo]: return ">"
>    else: return "="
>