On Friday, May 1, 2020 at 12:30:10 PM UTC-7, John Atom wrote:
>
> If I define a function: 
>
> f(x) = x**2
>
> and then print it, sage always prints it as `x^2`. 
>
> Is it possible to change the default output of the power operator to '**' 
> ? 
>

I suspect it will be hard, because these "^" are coming from lots of 
places, including third party libraries that know how to produce a string 
representation of their internal representation. I think:

str(f).replace('^','**')

is going to be the most reliable way of accomplishing this.
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6a107b78-3f7f-4646-9867-d00c80441362%40googlegroups.com.

Reply via email to