The recent evolution of Sage seems to break the print(eval(read)) equivalence :
sage: var("a0, a1") (a0, a1) sage: "%s"%a0^a1 'a0^a1'So far so good. But :
sage: eval("%s"%a0^a1) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[54], line 1 ----> 1 eval("%s"%a0**a1) File <string>:1 File /usr/local/sage-10/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/sage/structure/element.pyx:952, in sage.structure.element.Element.__xor__ (build/cythonized/sage/structure/element.c:16917)() 950 951 def __xor__(self, right): --> 952 raise RuntimeError("Use ** for exponentiation, not '^', which means xor\n" 953 "in Python, and has the wrong precedence.") 954 RuntimeError: Use ** for exponentiation, not '^', which means xor in Python, and has the wrong precedence.But, inconsistently :
sage: "%s"%a0**a1 'a0^a1'In other words, Sage insists for reading x**y and for printing x^y.
Unless I’m missing something, these choices are inconsistent.
Should I file an issue ?