Re: [sage-support] Re: Policy regarding the output of a standard Sage function

2014-12-06 Thread Jeroen Demeyer
On 2014-12-05 16:53, William Stein wrote: I certainly think the design as it is now is extremely consistent with the rest of Sage and with standard Python programming practices. Yes, see also https://docs.python.org/2/glossary.html#term-eafp -- You received this message because you are subscrib

Re: [sage-support] Re: Policy regarding the output of a standard Sage function

2014-12-06 Thread Jeroen Demeyer
On 2014-12-06 05:39, kcrisman wrote: I think in this case because > Write the integer n as a sum of two integer squares if possible; and it doesn't give a full list of *all* ways to do so, the ValueError is appropriate. But if it returned a list of all such squares (warning: don't try this at

Re: [sage-support] Re: Policy regarding the output of a standard Sage function

2014-12-05 Thread kcrisman
> > It is not obvious (for non-experts) that this is the elegant and preferred > route. It would be nice if this 'solution' was mentioned somewhere. > > This could be something to put in the Sage developer manual under conventions. > As part of the function, or when an ValueError is raised,

Re: [sage-support] Re: Policy regarding the output of a standard Sage function

2014-12-05 Thread Rolandb
Dear William, Thanks for your reply and thoughtful example. It is not obvious (for non-experts) that this is the elegant and preferred route. It would be nice if this 'solution' was mentioned somewhere. As part of the function, or when an ValueError is raised, or on a Quick Reference Card, o

Re: [sage-support] Re: Policy regarding the output of a standard Sage function

2014-12-05 Thread William Stein
On Fri, Dec 5, 2014 at 7:38 AM, kcrisman wrote: > Hmm, this is a fairly old function, if I recall correctly, implemented > relatively early on.There may be some discussion from where it was > upgraded at http://trac.sagemath.org/ticket/16308 or > http://trac.sagemath.org/ticket/16374 (I cannot

[sage-support] Re: Policy regarding the output of a standard Sage function

2014-12-05 Thread kcrisman
Hmm, this is a fairly old function, if I recall correctly, implemented relatively early on.There may be some discussion from where it was upgraded at http://trac.sagemath.org/ticket/16308 or http://trac.sagemath.org/ticket/16374 (I cannot find the original ticket, which surprises me). So i