The coersion
    sage: ZZ(1/2)
fails and (correctly) raises a TypeError while
    sage: ZZ(QQbar(sqrt(17)))
fails and (incorrectly) raises a ValueError. 

This has several knock on effects, in particular vector(ZZ, [list of 
algebraic numbers]) all of whoms try / except blocks are set up to catch a 
TypeError in the event that one of the elements fails to be coerced to an 
integer. This in turn causes 
Polyhedron([(AA(sqrt(17)),)]).integral_points() to fail as this ValueError 
is never caught.

Should the _integer_ methods in qqbar.py be changed to raise TypeErrors 
like the other number types in Sage?

-- 
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