[sage-devel] Re: more trouble with comparisons

2009-04-25 Thread Robert Bradshaw
On Apr 25, 2009, at 12:40 AM, Alex Ghitza wrote: > >> >> Translation, if it's not clear. It got a coercion map f, tried to >> call f(x), and f(x) returned None which is clearly a bug for whoever >> implemented the morphism in question. >> > > That helped me track it down to > > {{{ > sage: X = Spe

[sage-devel] Re: more trouble with comparisons

2009-04-25 Thread Alex Ghitza
> > Translation, if it's not clear. It got a coercion map f, tried to > call f(x), and f(x) returned None which is clearly a bug for whoever > implemented the morphism in question. > That helped me track it down to {{{ sage: X = Spec(ZZ) sage: H = Homset(X, X) sage: H(X.identity_morphism()) }}}

[sage-devel] Re: more trouble with comparisons

2009-04-24 Thread Robert Bradshaw
On Apr 24, 2009, at 11:29 PM, Alex Ghitza wrote: > >> >> Try calling canonical_coercion explicitly. What error is being >> thrown!? >> > > Right. Here goes: > > {{{ > sage: X = Spec(ZZ) > sage: f = X.identity_morphism(); g = X.identity_morphism() > sage: canonical_coercion(f, g) > ERROR: An u

[sage-devel] Re: more trouble with comparisons

2009-04-24 Thread Alex Ghitza
> > Try calling canonical_coercion explicitly.  What error is being thrown!? > Right. Here goes: {{{ sage: X = Spec(ZZ) sage: f = X.identity_morphism(); g = X.identity_morphism() sage: canonical_coercion(f, g) ERROR: An unexpected error occurred while tokenizing input The following traceback ma

[sage-devel] Re: more trouble with comparisons

2009-04-24 Thread William Stein
On Fri, Apr 24, 2009 at 11:05 PM, Alex Ghitza wrote: > > Hi, > > I'm still working on fixing up schemes/generic/morphism.py, and I'm > still having trouble with comparisons.  I have written __cmp__() > methods, but they don't seem to be called.  Here's a concrete example. >  The definition of __c