Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium Assumptions Printing

New issue 3032 by [email protected]: srepr does not include assumptions
http://code.google.com/p/sympy/issues/detail?id=3032

In [55]: r = Symbol('r', positive=True)

In [56]: srepr(r)
Out[56]: Symbol('r')

Other printers have the same problem:

In [57]: python(r)
Out[57]:
r = Symbol('r')
     e = r

Those are the two I can think of now that should include the assumptions.

This is nontrivial to fix, unless we just include *all* assumptions with every Symbol, since, as far as I can tell, there is no way to tell in the current (old) assumptions code which assumptions were set by the user and which were deduced. Depending on how complicated this is, it may not even be worth fixing for the old assumptions, but we should at least revisit it when we get global assumptions running with the new assumptions.

And for what it's worth, keeping track of which assumptions were explicitly set would be useful for other things as well (for example, pickling, see issue 2587).

If this does become an issue for someone, it would not be difficult to at least add an option to srepr() to include all the assumptions (from .assumptions0).

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

Reply via email to