Larry Hastings added the comment:

Good idea, I'll go ahead and borrow Guido's time machine.

https://docs.python.org/3/library/ast.html#ast.NodeVisitor

However, NodeVisitor does not transform the ast tree back into text.  So in 
what way is this helpful?


Also, for what it's worth: both my use cases only need to handle expressions 
("r-values" if you prefer).  I don't need to generate classes, functions, 
blocks, or even statements.  If we wanted to weaken the implementation to only 
handle expressions I'd be happy.  (In fact, I'd be happier this way, because it 
means the implementation would be much simpler!)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24002>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to