On 25 Apr., 17:11, Gonzalo Tornaria <torna...@math.utexas.edu> wrote:
> Also, the "== doesn't fail" part seems to force this, since it would
> be even more awkward to hide the coercion failure.

See my last two posts. In addition, Sage behaves different to Python
in many other cases.
(I'd say it is *necessary* to break Python's convention here, i.e.
*don't* hide it, following the Principle of Least Astonishment -- to
mathematicians, not Python programmers -- and staying or getting ;-)
mathematically sound.)


> I'd rather have
>
>     sage: 1/3 == GF(3)(1)
>
> raise a ZeroDivisionError, and

I'd prefer TypeError (or coercion error, "incompatible types", not yet
existent I guess)

>
>     sage: 1/4 == GF(3)(1)
>     True
>     sage: 1/5 == GF(3)(1)
>     False
>
> but others didn't agree with me.

I think I won't either. ;-)

> You may have a point with the "exact domain" --> "inexact domain"
> coercions being partial. I think the reasoning is that as long as you
> only coerce from the exact domain into the inexact domain, there
> shouldn't be problems.

Why? Or did you mean coercing from the *in*exact domain to the exact
one?

-Leif

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to