#10761: Numerical approximation of an algebraic number raises a ValueError
----------------------------+-----------------------------------------------
Reporter: slabbe | Owner: tbd
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: numerical | Keywords: numerical_approx, AlgebraicNumber
Author: Simon Spicer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Comment(by rbeezer):
Hi Simon,
This will be ''very'' useful, thanks for digging it up. Three comments:
1. {{{type(E[1])}}} would be more accurate (and readable) as
{{{E[1].parent()}}}, more Sage-like.
2. I write lots of "naked" except clauses, which I think is a bad
practice. Is this a place where could just add {{{", Value Error"}}}
after the {{{TypeError}}}?
3. Style Points: I think three lines of source comments for this fix is
more than you would normally see. With the Trac number in the docstring,
and a patch on Trac, you don't need to say so much. With one line here,
it'd warn anybody away from messing with it.
Passes all long tests right now.
Rob
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10761#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.