Comment #19 on issue 281 by [email protected]: Infinity is a subclass of Rational
http://code.google.com/p/sympy/issues/detail?id=281

The problem is this little gem in test_repr.py:


def test_printmethod():
    class R(oo.__class__):
        def _sympyrepr(self, printer):
            return "foo"
    assert srepr(R()) == "foo"
    class R(Abs):
        def _sympyrepr(self, printer):
            return "foo(%s)" % printer._print(self.args[0])
    assert srepr(R(x)) == "foo(Symbol('x'))"

This registers R with SingletonRegistry. I guess the solution here is to just replace oo.__class__ with Rational, which is what it used to be, though I don't understand why that test was created with that particular subclass in the first place (git blaming it doesn't lead to any insight).

--
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