[Zope] - Problem with ExternalMethod

Andy Dustman adustman@comstar.net
Tue, 8 Dec 1998 12:34:16 -0500 (EST)


On Tue, 8 Dec 1998, Jim Fulton wrote:

> and caused an effective enequality.  In Python 1.5 cmp is handled 
> differently, which is a good thing, and I failed to test ExternalMethod
> with it, which is a bad thing. :|
> 
> The next release will have following __cmp__ function, which seems to
> solve the problem:
> 
>     def __cmp__(self,other):
>         if other is None: return 1
>         try: return cmp((self.co_argcount, self.co_varnames),
>                         (other.co_argcount, other.co_varnames))
>         except: return 1

Woo-hoo! Fixes my problems, too. 

-- 
Andy Dustman                    You should always say "spam" and "eggs"
ComStar Communications Corp.                 instead of "foo" and "bar"
(706) 549-7689 | PGP KeyID=0xC72F3F1D   in Python examples. (Mark Lutz)