Updates:
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low
Comment #2 on issue 1976 by asmeurer: Add is_one attribute to Basic (or
Expr)
http://code.google.com/p/sympy/issues/detail?id=1976
Rather than Poly(1, x).is_one, I would expect to see Poly(1, x) == S(1),
or Poly(1, x) == some_ring.identity.
We absolutely do not want to do that. Poly should be as independent of
Basic as possible. You always want Poly1*Poly2 or Poly.some_poly_method()
to work. The second one is bad too, since Poly(1, x) != Poly(1, y) !=
Poly(1, x, y) (you have to provide generators to even create Poly(1); this
is the whole reason for having is_one). Poly is a wrapper around the
ground types, and we always want it to stay so (classes that return
non-instances of themselves are a major headache in algorithms).
I just discovered that this isn't as important as I thought it was, so I'll
at least put it on lower priority and see what others think.
--
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.