The cache issue runs deeper -- variable x, that depends on variably y, may simplify to something that doesn't even involve y because of the assumptions that come with y. In this case, a result is stored for x that is only valid under the right assumptions for y, and we would need to be very careful about what cache entries change when we delete y.
The example may sound contrived, but it does arise in practice, and was a headache to debug. On Sat, Apr 30, 2011 at 2:21 PM, Tom Bachmann <ness...@googlemail.com>wrote: > > > It should also be emphasized that it isn't just a simple notion of > > cleaning up assumptions after yourself -- the cache interacts in quite an > > intertwined way. Under the right assumptions, expressions will be > > simplified, and variables will be assigned certain values. If that's > stored > > in the cache, changing any related assumption will invalidate the result. > > Why not make assumptions part of the hash of an object? At least to > the extent that the cache is concerned? > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.