Ask Your Question
0

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

asked 2020-10-20 05:04:17 +0200

cybervigilante gravatar image

updated 2020-10-20 14:57:51 +0200

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 17:08:10 +0200 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2020-10-20 06:21:20 +0200

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-20 05:04:17 +0200

Seen: 193 times

Last updated: Oct 20 '20