instead of `a%p` write `a % p`. Also, since this will have to be computed again later you might as well do both at the same time:
a, r = divmod(a, p) if not r: return 0 if is_quad_residue(a, p): return 1 else: return -1 -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.