Mark McEahern marklists at
Sat Feb 9 01:03:52 EST 2002

[Jason Orendorff]
> How about:
>     def __cmp__(self, other):
>         try:
>             xn, yn, p = _norm(self, other)
>             return cmp(xn, yn)
>         except:
>             return cmp(float(self), other)

I like that!  Would it be better style to trap only the specific error I
know about?


// mark

More information about the Python-list mailing list