FixedPoint

Mark McEahern marklists at mceahern.com
Sat Feb 9 07:03:52 CET 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?

Thanks,

// mark





More information about the Python-list mailing list