4 ms·
> They have other things to smooth out the parts of python I should add that this is an interesting chunk of Python code, and we've always planned to separate
by williamstein 4y ago
> They have other things to smooth out the parts of python
I should add that this is an interesting chunk of Python code, and we've always planned to separate it out from Sage as a separate library than could be used with Sympy, etc.
https://github.com/sagemath/sage/blob/52a81cbd161ef4d5895325657c88a68590ea1d3b/src/sage/repl/preparse.py https://github.com/sagemath/sage/blob/52a81cbd161ef4d5895325...
It does a surprising number of little clever things we realized would be a good idea over years, and it has some neat ideas from various Python PEP's like [1..10] that were rejected from Python, but are very useful when expressing mathematics. It's also annoying when you just want to format your code using prettier (say), and you can't because Sage isn't Python. :-(
- westurner 4y agoRecently I've been working with the %%ipytest magic command for running pytest in notebooks. Is there a %%sage IPython magic method that passes code through the preparse.py input transform?
- westurner 4y agosrc/sage/repl/ipython_extension.py: https://github.com/sagemath/sage/blob/develop/src/sage/repl/ipython_extension.py https://github.com/sagemath/sage/blob/develop/src/sage/repl/... docs: https://doc.sagemath.org/html/en/reference/repl/sage/repl/ipython_extension.html https://doc.sagemath.org/html/en/reference/repl/sage/repl/ip... https://github.com/sagemath/sage/blob/develop/src/sage/repl/ipython_tests.py https://github.com/sagemath/sage/blob/develop/src/sage/repl/...