Status: Accepted
Owner: smi...@gmail.com
Labels: Type-Defect Priority-Medium

New issue 2376 by smi...@gmail.com: should subs use strict=True when sympifying?
http://code.google.com/p/sympy/issues/detail?id=2376

sympify can be used to change strings into expressions, but if a routine is just doing light-sympification so that integers become Integers, etc... _sympify or sympify(..., strict=True) should probably be used. Perhaps _sympify should be renamed and made un-private to encourage its use. Something like "touch" or some other name to indicate that only a light processing is being done.

The problem is that e.subs('y', 1) will convert 'y' to vanilla symbol y and that will replace any -- and only -- vanilla y symbols with 1. If there are y variables with any assumptions they (after Ronan's commit) won't be changed.

The other option is to make a string subs value target things by name regardless of assumptions...but I'm not sure that's a good idea. It would certainly make some issues easier to deal with but might lead to some hard to track bugs.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to