The call to S is not necessary.  `self.q` is coming from `Poly.all_coeffs`, which always returns a SymPy type, so this will already be a SymPy type.  

And if it were a Python int, this wouldn't work. You would need to have the `/2` outside the S for it to work (like `S(-25*self.q)/2`).