def findnonresidue(self):
    '\n        find a random non quadratic residue in the Field F,\n        that is, find g that is not a square in F, this is\n        needed to compute square roots\n        '
    g = self.random()
    while g.isquadres():
        g = self.random()
    return g
find a random non quadratic residue in the Field F,
that is, find g that is not a square in F, this is
needed to compute square roots
def findnonresidue(self):
    '\n        find a random non quadratic residue in the Field F,\n        that is, find g that is not a square in F, this is\n        needed to compute square roots\n        '
    g = self.random()
    while g.isquadres():
        g = self.random()
    return g