This is the second example I have come across where I couldn't find a
function because it didn't have a name, "only" a functional form using
brackets().

The other one was polynomial evaluation (substitution), for example

R=QQ[x]
f=x^2+3
f(10)   ## =103

-- in this case as soon as I mentioned it to William he implemented an
equivalent f.subs(10) syntax which can at least be found using
tab-completion.

In Justin's example, could he have found the PSR(list) construction
from tab-completion?  I don't think so.  How can we make the existence
of these (neat, clever) tricks more visible to the user?

John

On 8/12/07, Justin C. Walker <[EMAIL PROTECTED]> wrote:
>
>
> On Aug 12, 2007, at 14:38 , William Stein wrote:
>
> >
> > On 8/12/07, Justin C. Walker <[EMAIL PROTECTED]> wrote:
> >> Hi, all,
> >>
> >> A question: I have a batch of lists of ring elements that I'd like to
> >> turn into either polynomials or power series, a la
> >>
> >> sage: PSR.<t>=PowerSeriesRing(QQ)
> >> sage: f = PowerSeries(PSR,[a,b,c])
> >>
> >> There doesn't seem to be a way to do this, other than the obvious.
> >> Does it make sense to support such coercion, or should one just bite
> >> the editor and code it as needed?
> >
> > I'm not sure what you're asking, but what's wrong with this?
> >
> > sage: PSR.<t>=PowerSeriesRing(QQ)
> > sage: PSR([1,2,3])
> > 1 + 2*t + 3*t^2
> >
> > I.e., coercion of lists to power series is built in already.
>
> Well, frankly, there is nothing wrong with that.  In fact, it's what
> I want.  I will have to figure out what I did to convince myself that
> it didn't work.
>
> Thanks!
>
> Justin
>
> --
> Justin C. Walker, Curmudgeon-At-Large
> Institute for the Enhancement of the Director's Income
> --------
> When LuteFisk is outlawed,
> Only outlaws will have LuteFisk
> --------
>
>
>
>
> >
>


-- 
John Cremona

--~--~---------~--~----~------------~-------~--~----~
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-forum
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to