Hello,

On Wed, Jun 17, 2009 at 9:13 AM, Mikie<[email protected]> wrote:
>
> I cannot use R.<x>  the period.  The python code is in a script.  I am
> taking the string from a form and want to convert to a polynomial then
> factor the expression.  This is from my Twisted API.

Here is the exact Python code that the R.<x> notation gets translated into:

sage: preparse('R.<x> = QQ[]')
"R = QQ['x']; (x,) = R._first_ngens(1)"

So, for this example, one (cleaner) way of doing the exact same thing is

R = QQ['x']
x = R.gen()

The R.<x> just saves you from having to type the variable name twice.

--Mike

--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to