ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 20 Jun 2015 01:19:49 +0200Recovering an overwritten Sage built-in namehttps://ask.sagemath.org/question/27171/recovering-an-overwritten-sage-built-in-name/
In Python 2.7, if you accidentally overwrite a builtin name (eg `max, str, int`, ...), you can recover it by calling the `__builtins__` module :
>>> max(2020, 42)
2020
>>> max=2038
>>> max(2020, 42)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>> max=__builtins__.max
>>> max(2020, 42)
2020
>>>
What is the equivalent for Sage built-in names (there are about 2000 so accident can occur) ? For instance, imagine I overwrite the complex number I :
sage: I=42
How can I recover it ?candideSat, 20 Jun 2015 01:19:49 +0200https://ask.sagemath.org/question/27171/Why are Notebook docs different from CLI docs? What is Namespace "Interactive"?https://ask.sagemath.org/question/7680/why-are-notebook-docs-different-from-cli-docs-what-is-namespace-interactive/The sage terminal returns the following, but the notebook interface omits the "Base Class", "String Form", "Namespace", and "Length": <br>
<br> <hr>
sage: NaN? <br>
Type: Expression <br>
Base Class: type 'sage.symbolic.expression.Expression' <br>
String Form: NaN <br>
Namespace: Interactive <br>
Length: 0 <br>
File: /SAGE_DIR/local/lib/python2.6/site-packages/sage/categories/commutative\_rings.py <br>
Definition: NaN(self, \*args, \*\*kwds) <br>
Docstring: <br>
x.\_\_init\_\_(...) initializes x; see x.\_\_class\_\_.\_\_doc\_\_ for signature <br>
<hr> <br>ccanoncFri, 10 Sep 2010 00:07:04 +0200https://ask.sagemath.org/question/7680/What state is preserved when I close a running notebook browser window?https://ask.sagemath.org/question/7638/what-state-is-preserved-when-i-close-a-running-notebook-browser-window/What state is preserved when I close a running notebook browser window?
When I navigate back to the main dashboard/login page, or refresh it from another tab, the notebook is still marked as "(running)". So, when I return to the notebook by opening it in another new tab or window, what state has been preserved, and what state has been lost?ccanoncWed, 25 Aug 2010 19:20:35 +0200https://ask.sagemath.org/question/7638/What is a common use-case for "./sage -min"?https://ask.sagemath.org/question/7594/what-is-a-common-use-case-for-sage-min/Is the "./sage -min" option purely preference driven (for a person who simply prefers a clean namespace)? Is it commonly used?ccanoncThu, 19 Aug 2010 15:49:52 +0200https://ask.sagemath.org/question/7594/