Ask Your Question

Why does implicit multiplication not work in the Sage Cell Server?

asked 2020-06-17 15:37:41 -0500

dsejas gravatar image

Hello, Sage Community!

Is there any reason for implicit_multiplication(True) not having any effect in SageCell? Is there any way of solving this?

Thanks in advance for your answers!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2020-06-17 19:08:40 -0500

tmonteil gravatar image

updated 2020-06-17 19:38:43 -0500

I think this is not specific to SageCell. It is the same in jupyter. implicit_multiplication changes the behaviour of the preparser, but the whole cell is preparsed according to the previous state of the preparser.

If, in a single cell, you write:


You will get an error. But if you put the two lines in different cells, then it will work.

To take another example, you can do:


You will get <class 'sage.rings.integer.Integer'> because the whole cell was preparsed before the preparser is turned off. If you put the two lines in two different cells, you will get <class 'int'>, because the second line will not be preparsed anymore.

About the Sage preparser, see

The sagecell works like a single jupyter cell.

edit flag offensive delete link more


Hello, @tmonteil! I see. Is there any possible tweak for using implicit multiplication in Sage Cell? Or is this a definitive unavoidable behavior?

dsejas gravatar imagedsejas ( 2020-06-22 11:46:12 -0500 )edit

I doubt there is an easy way without modifying sagecell (or running your own).

tmonteil gravatar imagetmonteil ( 2020-06-23 05:45:24 -0500 )edit

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


Asked: 2020-06-17 15:37:41 -0500

Seen: 73 times

Last updated: Jun 17