Ask Your Question
1

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

asked 4 years ago

cybervigilante gravatar image

updated 4 years ago

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.

Preview: (hide)

Comments

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

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.

Preview: (hide)
link

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: 4 years ago

Seen: 287 times

Last updated: Oct 20 '20