Updates:
Labels: NeedsReview asmeurer
Comment #11 on issue 1946 by asmeurer: Recursion error with
SYMPY_GROUND_TYPES=sympy (caching problem)
http://code.google.com/p/sympy/issues/detail?id=1946
Well, I think this is important, so I created a patch to fix it. Actually,
with the way the code is, as long as the bug in comment 3 is fixed the one
in comment 4 won't create any problems, because something like S(2**100) ==
2**100 will just fall back to Rational.__eq__, which calls sympify.
However, fixing it to use isinstance(b, (int, long)) makes it faster,
because it doesn't have to call sympify:
In [1]: a = S(2**100)
In [2]: b = 2**100
before:
In [9]: %timeit a == b
100000 loops, best of 3: 7.23 us per loop
after:
In [5]: %timeit a == b
1000000 loops, best of 3: 1.09 us per loop
So see https://github.com/sympy/sympy/pull/70.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.