Comment #35 on issue 1923 by nicolas.pourcelot: count_ops doesn't return a count (by default)
http://code.google.com/p/sympy/issues/detail?id=1923

Well, I personally don't mind.

Concerning style, however, I would write it as following :

    elif isinstance(expr, Expr):
        return expr.count_ops(visual)
    return NotImplemented

or

    elif isinstance(expr, Expr):
        return expr.count_ops(visual)
    raise NotImplementedError

Note that since Expr is a subclass of Basic, "not isinstance(expr, Expr) or not isinstance(expr, Basic)" is a verbose equivalent of "not isinstance(expr, Expr)".

--
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patc...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en.

Reply via email to