def isquadres(self):
    ' This method return True if the element is a quadratic residue mod q\n            different than zero\n            it returns False otherwhise\n        '
    if (self + self.F.zero()).iszero():
        return False
    else:
        c = (self ** ((self.F.q - 1) / 2))
        return (c == self.F.one())
This method return True if the element is a quadratic residue mod q
different than zero
it returns False otherwhise
def isquadres(self):
    ' This method return True if the element is a quadratic residue mod q\n            different than zero\n            it returns False otherwhise\n        '
    if (self + self.F.zero()).iszero():
        return False
    else:
        c = (self ** ((self.F.q - 1) / 2))
        return (c == self.F.one())