On Thursday 22 March 2007 13:48, David Harvey wrote: > > This feels just a bit pedantic to me, but I think it might be a bug > > from some > > viewpoint. > > > > I'm looking at the polynomial function quo_rem and I see that it > > does it's own > > coercion manually. This feels a little wrong to me. I think it > > should go > > through the standard coercion routines. Here's a "bug" that results: > > > > sage: x=ZZ['x'].0 > > sage: y=QQ['x'].0 > > sage: (y+1).quo_rem(1/2*x) > > (2, 1) > > sage: (x+1).quo_rem(1/2*y) > > ... > > <type 'exceptions.TypeError'>: no coercion of this rational to integer > > > > The bug is that I don't see why these two things are treated > > substantially > > differently. The reason I found this is because the simple > > "TypeError" > > exception did not provide the usual message about parents being > > mis-matched -- I think this is a bug in itself. > > > > Any comments? > > Exactly which quo_rem() method are you talking about? Which class?
Hmm, yes, I was thinking of including that information -- I see I didn't. I think that any of them in polynomial_element_generic.py exhibit analogous behaviour. The one around line 897 is one specific instance. -- Joel --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---
