1 | initial version |
This previous response gives a clue : the reset
function. Passing the variables as a string argument, the reset
function allows to selectively restore some Sage global variables in their initial state. Example :
sage: max(2000,2038)
2038
sage: max=42
sage: max(2000,2038)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-1c36721a9cff> in <module>()
----> 1 max(Integer(2000),Integer(2038))
TypeError: 'sage.rings.integer.Integer' object is not callable
sage: I=42
sage: reset("max I")
sage: I*I
-1
sage: max(2000,2038)
2038