Ask Your Question
0

what does the .<...> notation mean?

asked 2020-10-19 22:04:17 -0600

cybervigilante gravatar image

updated 2020-10-20 07:57:51 -0600

slelievre gravatar image

I was reading about Basic Rings, and the notation
ratpoly.<t> = PolynomialRing(QQ)
popped up. What is the <> for? It's not a function call, although I can see what it does. And the ratpoly has no meaning. I substituted skunkpoly with the same result. I can't seem to find much about it.

edit retag flag offensive close merge delete

Comments

Sébastien gravatar imageSébastien ( 2020-10-20 10:08:10 -0600 )edit

1 answer

Sort by » oldest newest most voted
2

answered 2020-10-19 23:21:20 -0600

As you probably know, Sage is built on top of Python, but then it extends Python's syntax. If you're not sure what some non-Python thing does, use the preparse command:

sage: preparse("ratpoly.<t> = PolynomialRing(QQ)")
"ratpoly = PolynomialRing(QQ, names=('t',)); (t,) = ratpoly._first_ngens(1)"

So ratpoly.<t> = PolynomialRing(QQ) creates a polynomial ring with coefficients in the rationals (QQ). The ring itself is called ratpoly, and the generator is called t.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-10-19 22:04:17 -0600

Seen: 70 times

Last updated: Oct 20