Comment #3 on issue 3635 by asmeu...@gmail.com: Backwards compatibility with old assumptions
http://code.google.com/p/sympy/issues/detail?id=3635

Another option would be to actually just allow symbols to have assumptions on them. In other words, the global assumptions are merged with assumptions that live on an object, which would usually be nothing, but could be occasionally something. This could be implemented basically as the old assumptions, or Symbol('x', positive=True) could just set itself to something like Symbol('x', flag=1), where the flag is an internal attribute that affects equality testing but not printing, and then set that object to be positive in the global assumptions (similar to Dummy, except a second Symbol('x', positive=True) would first check if there is a positive Symbol x in the global assumptions and set itself to that if there is). I'm not really sure if the second idea really has any advantages over just keeping the assumption on Symbol. Also, one of the whole ideas of the new assumptions was to remove assumptions from the core, so this might negate some of that. In particular, in addition to design questions, we need to consider how this will affect the speed of the core, as well as its modularity.

For what it's worth, I actually doubt many people are using the same names for symbols with different assumptions. Not long ago, they actually compared equal. I just checked the git tags, and SymPy 0.7.0 was the first version where Symbol('x') == Symbol('x', real=True) returned False. So my gut instinct says that this probably won't really be a huge deal for most people.

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


Reply via email to