On Tue, Feb 17, 2015 at 7:14 AM, Pablo De Napoli <pden...@gmail.com> wrote:
> Many thanks Nils for your help.
>
> I think that is important that sage has consistent and easy to use
> interfaces, that functions do what most people would expect them to do
> at every place. Specially if we want it to be used in calculus
> classes, etc.
>
> Writing something like
>
> SR(0).function(x)
>
> instead of
>
> ConstantFunction(0)
>
> is not what most mathematicians or students would do,  I guess. Maybe
> there is something to improve here.
>


Agreed. The Piecewise class is very old and needs to be rewritten. I
think it even predates the nice symbolic function interface Sagemath
has.


> Pablo
>
>
>
>
>
> On Mon, Feb 16, 2015 at 1:39 PM, Nils Bruin <nbr...@sfu.ca> wrote:
>> On Monday, February 16, 2015 at 8:33:49 AM UTC-8, Nils Bruin wrote:
>>>
>>>
>>> f3=Piecewise([([0,1],SR(0).function(x)),([1,2],(1-x).function(x))])
>>
>>
>> Incidentally, the Piecewise documentation, which you can get with
>> "Piecewise?" , has a nice shortcut form:
>>
>> sage: f3 = Piecewise([([0,1],SR(0)), ([1,2],1-x)], x)
>>
>> (unfortunately it is necessary to write "SR(0)" there)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-devel@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to