Comment #5 on issue 1206 by asmeurer: Integer and Rational do not
implement .args
http://code.google.com/p/sympy/issues/detail?id=1206
Why would we have Integer(42)() == 42?
I think the second option makes the most sense. The point of having
Basic .args is so you can recurse through them. An Atom should be the base
case of recursion. So I guess the question is, do Integer and Rational
count as Atoms. In particular for Rational, should it be an Atom or should
it act like Rational(3, 2).args == (Integer(3), Integer(2))?
I see why they would't have .args, but why would they not have .func?
Actually, to me, it seems that the best would be to have .args be (). This
technically wouldn't hold the invariant, but I think it would play nicer
with recursion algorithms. So I guess the question there is do we require
that the base case be checked by looking for an empty .args, or by checking
obj.is_Atom?
--
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.