On Wed, May 19, 2021 at 8:14 AM Ricky Teachey <ri...@teachey.org> wrote:
> It's a neat idea but I agree with the others that as proposed, it's > probably too focused on turning python into a better mathematics tool, > rather than turning python into a better programming language. > > That being said, from a more generalist standpoint I wonder if it would be > useful in many connects other than symbolic math to have a way to "get to" > and work with the actual written code in a module from inside that same > module. Essentially to parse actual lines of code, not strings containing > code, into an AST, and work with it. > >> >> You can essentially do this using import hooks as I have mentioned many times on this list. A good example of what one can accomplish by transforming and AST is given by MacroPy: https://macropy3.readthedocs.io/en/latest/ I also gave various examples of using import hooks to modify Python's syntax using https://github.com/aroberge/ideas which I wrote to facilitate such experimentation -- although I consider this more of a toy than anything resembling a professional and robust package. André Roberge
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/FYXX7EMPLJ23CCIGDVFNNPP2NPDNJCS6/ Code of Conduct: http://python.org/psf/codeofconduct/