Robert Bradshaw wrote:

> I already wrote such a thing, see http://hg.sagemath.org/sage-main/ 
> file/5be1d5ad8339/sage/misc/parser.pyx . To implement hold, one would  
> modify the preparser to do something like
> 
> hold(...) -> SR("...", no_simplification=True)
> 
> and of course make sure it propagates the no_simplification (or  
> whatever it's called) flag so that when it's printed it doesn't  
> simplify itself with maxima. This would of course only work for  
> symbolic expressions, not arbitrary chunks of Python code. (Arbitrary  
> chunks of Python code could be handled as well, using the ast and  
> compile modules, but that's a whole different type type of thing, and  
> one couldn't expect to pass them to maxima.)

Yep, this is exactly the sort of thing I was imagining.


> Modifying the preparser is not something that should be IMHO taken  
> lightly.


I agree that modifying the preparser should only be done after very 
carefully weighing the advantages and disadvantages!

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to