[sage-devel] Re: Coercion and exception handling

2009-03-12 Thread Nicolas M. Thiery
> Ideally, the coercion model just has the idea of an action, without > having to specify where they can come from. In any case, it's clear > there's some cleaning up to do, and I'll go in and do that (though > not right now). Yup. That's why in MuPAD we were doing this declaratively; somet

[sage-devel] Re: Coercion and exception handling

2009-03-12 Thread Robert Bradshaw
On Mar 12, 2009, at 2:42 PM, Florent Hivert wrote: > Dear Robert, > > The very purpose of the category framework it to declare in a > mathematical > way, this that have a matematical meaning. In the case of a right > action of A > on B, on declare that B is a A-RightModu

[sage-devel] Re: Coercion and exception handling

2009-03-12 Thread Florent Hivert
Dear Robert, > >>> The very purpose of the category framework it to declare in a > >>> mathematical > >>> way, this that have a matematical meaning. In the case of a right > >>> action of A > >>> on B, on declare that B is a A-RightModule. It is much more > >>> informative by all > >>> res

[sage-devel] Re: Coercion and exception handling

2009-03-12 Thread Robert Bradshaw
On Mar 12, 2009, at 2:17 PM, Florent Hivert wrote: >>> The very purpose of the category framework it to declare in a >>> mathematical >>> way, this that have a matematical meaning. In the case of a right >>> action of A >>> on B, on declare that B is a A-RightModule. It is much more >>> informati

[sage-devel] Re: Coercion and exception handling

2009-03-12 Thread Florent Hivert
> > The very purpose of the category framework it to declare in a > > mathematical > > way, this that have a matematical meaning. In the case of a right > > action of A > > on B, on declare that B is a A-RightModule. It is much more > > informative by all > > respect than testing if a random

[sage-devel] Re: Coercion and exception handling

2009-03-12 Thread Robert Bradshaw
On Mar 11, 2009, at 1:21 PM, Florent Hivert wrote: > >> How many places is this used? In my (fairly fresh) Sage session, >> there are only 9 actions in the action cache (on matrices, number >> fields, and polynomials). I'd be willing to write the _get_action_ >> methods for these cases, if it w

[sage-devel] Re: Coercion and exception handling

2009-03-11 Thread Florent Hivert
> How many places is this used? In my (fairly fresh) Sage session, > there are only 9 actions in the action cache (on matrices, number > fields, and polynomials). I'd be willing to write the _get_action_ > methods for these cases, if it would help kill off some of the excess > error catching in

[sage-devel] Re: Coercion and exception handling

2009-03-11 Thread Carl Witty
On Tue, Mar 10, 2009 at 6:01 PM, Robert Bradshaw wrote: > Most of the errors caught are because it's trying to detect an > action, i.e. given a*b, it tries out a._rmul_(b) and, if successful, > registers that as an action, but otherwise goes on to try the next > thing. The benefit of this is conv

[sage-devel] Re: Coercion and exception handling

2009-03-11 Thread Nicolas M. Thiery
> > Wish you had brought this up sooner. The other day I was looking at > > that code and thinking "oh, I could get rid of catching stuff there" > > but as it wasn't relevant to what I was doing at the time and I > > didn't see any urgency it went on my "todo later" list. I'll put up a > >

[sage-devel] Re: Coercion and exception handling

2009-03-10 Thread Nicolas M. Thiery
Hi Robert, > It's surprising that we end up catching SyntaxErrors! Isn't it? I'll try to make a reproducible example. > Yes, I think we could greatly reduce the number of exceptions caught. > At most, TypeError, NotImplementedError, and perhaps ValueError. Great! > Also, I think I

[sage-devel] Re: Coercion and exception handling

2009-03-10 Thread Robert Bradshaw
On Mar 10, 2009, at 5:38 PM, Nicolas M. Thiery wrote: > Dear Sage devels, dear Robert, > > From #sage-devel: > -- > > 00:54 < hivert> So one more day lost because of this #(&$%#^%$^*%#$ > bug !!! I'm heading to