Skip to content

Commit

Permalink
Fix docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mezzarobba committed May 5, 2014
1 parent 417d96b commit 7c9c847
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/sage/rings/integer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,14 @@ cdef set_from_Integer(Integer self, Integer other):

cdef set_from_pari_gen(Integer self, pari_gen x):
r"""
sage: [Integer(pari(x)) for x in [1, 2^60, 2., GF(3)(1)]]
[1, 1152921504606846976, 2, 1]
sage: Integer(pari(2.1))
Traceback (most recent call last):
...
TypeError: Attempt to coerce non-integral real number to an Integer
EXAMPLES::
sage: [Integer(pari(x)) for x in [1, 2^60, 2., GF(3)(1)]]
[1, 1152921504606846976, 2, 1]
sage: Integer(pari(2.1)) # indirect doctest
Traceback (most recent call last):
...
TypeError: Attempt to coerce non-integral real number to an Integer
"""
# Simplify and lift until we get an integer
while typ((<pari_gen>x).g) != t_INT:
Expand Down

0 comments on commit 7c9c847

Please sign in to comment.