On 2016-02-05 20:45, Vincent Delecroix wrote:
About the code, the current version is

{{{
def is_prime(n):
     try:
         return n.is_prime()
     except (AttributeError, NotImplementedError):
         return ZZ(n).is_prime()
}}}

I think that we should change it to

{{{
from sage.structure.coerce import py_scalar_to_element

def is_prime(n):
     return py_scalar_to_element(n).is_prime()
}}}

Right, but that's not the topic of this thread. It would still give the same result for elements of QQ.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to