Ticket #12625: trac_12625-review.patch

File trac_12625-review.patch, 1.3 KB (added by was, 7 years ago)

apply after the other patch

  • sage/libs/pari/gen.pyx

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1330878056 28800
    # Node ID 44bf1289168c72c897da591cf8161c8f96a000d7
    # Parent  43cbd617fa4da8e7000a76d50349e1425888a8fb
    Trac #12625: Referee (conversion)
    
    diff --git a/sage/libs/pari/gen.pyx b/sage/libs/pari/gen.pyx
    a b  
    36333633            sage: y = pari(x)
    36343634            sage: y.padicprec(11)
    36353635            -5
     3636            sage: y.padicprec(17)
     3637            Traceback (most recent call last):
     3638            ...
     3639            ValueError: not the same prime in padicprec
    36363640        """
    36373641        cdef gen _p
    36383642        _p = pari(p)
    36393643        if typ(_p.g) != t_INT:
    3640             raise TypeError, "p (=%s) must be of type t_INT, but is of type %s."%(
    3641                 _p, _p.type())
     3644            raise TypeError("p (=%s) must be of type t_INT, but is of type %s."%(
     3645                _p, _p.type()))
     3646        if not gequal(gel(x.g, 2), _p.g):
     3647            raise ValueError("not the same prime in padicprec")
    36423648        return padicprec(x.g, _p.g)
    36433649
    36443650    def padicprime(gen x):
     
    36603666            sage: y = pari(x)
    36613667            sage: y.padicprime()
    36623668            11
     3669            sage: y.padicprime().type()
     3670            't_INT'
    36633671        """
    36643672        sig_on()
    36653673        return P.new_gen(gel(x.g, 2))