I think the problem is that e([0]) is not defined.  This works:

for i in range(1,4):
    print(e([i]).expand(3))

x0 + x1 + x2
x0*x1 + x0*x2 + x1*x2
x0*x1*x2

For more advanced answers you might want to ask on the sage-combinat
group.

Cheers,
Marshall Hampton

On Oct 11, 9:24 pm, James Parson <[email protected]> wrote:
> Dear sage-support,
>
> Is there a preferred built-in method for invoking elementary symmetric
> functions in Sage?
>
> The best that I could turn up was something like the following:
>
> sage: e = SFAElementary(QQ)
> sage: e([2]).expand(3)
> x0*x1 + x0*x2 + x1*x2
>
> That is very nice, but when I tried to automate some constructions (in
> Sage 4.5.3), I ran into the following sort of problem:
>
> sage: for i in range(3):
> ...       print(e([i]).expand(3))
> Traceback (most recent call last):
> ...
> AttributeError: 'list' object has no attribute 'parent'
>
> Is it obvious what I am doing wrong or how I might work around this
> issue?
>
> Thanks for any suggestions that you can offer.
>
> James Parson

-- 
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-support
URL: http://www.sagemath.org

Reply via email to