Here is another coercion bug (or at least an inconsistency). Perhaps
it is not worth
fixing, given that everything is going to change. Anyway consider

sage: W=NumberField(z^2+1,'s')
sage: WXY.<X,Y>=W[]
sage: a=WXY(0)
sage: W(a)
---------------------------------------------------------------------------
...
<type 'exceptions.TypeError'>: Cannot coerce 0 into Number Field in s
with defining polynomial z^2 + 1

The same example over the rationals is fine

sage: QUV.<U,V>=QQ[]
sage: a=QUV(0)
sage: QQ(a)
0
I could probably fix this but it is not so clear to me yet where this
automatic coercion
happens.

Michel


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to