On Thu, Aug 28, 2008 at 9:47 AM, phil <[EMAIL PROTECTED]> wrote:
>
> How can I continue a line inside a < >?
> I want to write something like "A.<a,b,c> = ZZ[]" over two lines.
> After typing "A.<a,b, \ ", the interpreter gives a syntax error
> message.

Unfortunately I don't think you can do that.  Sorry.  You might want to
try using the inject_variables function:

sage: R = ZZ['a,b,c,d,e,f,g,h,i,j,k,foo,bar']
sage: R.inject_variables()
Defining a, b, c, d, e, f, g, h, i, j, k, foo, bar
sage: (a*b + g*h)^3
a^3*b^3 + 3*a^2*b^2*g*h + 3*a*b*g^2*h^2 + g^3*h^3

Incidentally, for stupid reasons, it's actually vastly
faster in sage right now to do arithmetic in QQ[...] than
in ZZ[...] when the polynomial is in >= 2 variables
(this will eventually change).

sage: timeit('(a*b + g*h)^3')
625 loops, best of 3: 101 µs per loop
sage: R = QQ['a,b,c,d,e,f,g,h,i,j,k,foo,bar']
sage: R.inject_variables()
Defining a, b, c, d, e, f, g, h, i, j, k, foo, bar
sage: timeit('(a*b + g*h)^3')
625 loops, best of 3: 3.63 µs per loop

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to