Comment #7 on issue 1923 by mattpap: count_ops doesn't return a count (by
default)
http://code.google.com/p/sympy/issues/detail?id=1923
The issue is, should "count_ops" return a sympy Integer or python
integer? There
is precedence for leaving some integers alone (like in polys exponents).
We have Integer class because we have to represent somehow integers in
expressions. So, if your function returns a result that is likely to be
used in an expression (e.g. LC() from polys) then use sympified result
(Integer class in this case). Otherwise, if the result will be used for
other purpose like iteration (e.g. Matrix.rows) then use native integer
type (int), because this is just more convenient to use (no need for
further conversions).
For me count_ops() belongs to the later group and should return int.
--
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.