ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 15 Jan 2015 08:40:14 +0100what does ratpoly.<t> = PolynomialRing(QQ) meanhttps://ask.sagemath.org/question/25524/what-does-ratpolyt-polynomialringqq-mean/ In official tutorial, I see the following command:
ratpoly.<t> = PolynomialRing(QQ)
I have python backgroud. I wonder what does it do and how it is implemented. After all, variable `ratpoly` is not defined previously.Thu, 15 Jan 2015 07:42:14 +0100https://ask.sagemath.org/question/25524/what-does-ratpolyt-polynomialringqq-mean/Answer by SL for <p>In official tutorial, I see the following command:</p>
<pre><code>ratpoly.<t> = PolynomialRing(QQ)
</code></pre>
<p>I have python backgroud. I wonder what does it do and how it is implemented. After all, variable <code>ratpoly</code> is not defined previously.</p>
https://ask.sagemath.org/question/25524/what-does-ratpolyt-polynomialringqq-mean/?answer=25525#post-id-25525Sage does some preparsing on what you type. You can see what happens with the command `preparse`
sage: preparse('ratpoly.<t> = PolynomialRing(QQ)')
"ratpoly = PolynomialRing(QQ, names=('t',)); (t,) = ratpoly._first_ngens(1)"
Thu, 15 Jan 2015 08:40:14 +0100https://ask.sagemath.org/question/25524/what-does-ratpolyt-polynomialringqq-mean/?answer=25525#post-id-25525