#15757: Make sage.misc.superseded lazily import sage.rings.integer_ring
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.1
Component: misc | Resolution:
Keywords: | Merged in:
Authors: Nicolas M. ThiƩry | Reviewers: Nathann Cohen, Jeroen
Report Upstream: N/A | Demeyer
Branch: | Work issues:
u/nthiery/ticket/15757 | Commit:
Dependencies: | c57640dab99e12a8fa94acc49cb4ee478704fcfe
| Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nthiery):
Replying to [comment:7 jdemeyer]:
> Why not remove `_check_trac_number(trac_number)` altogether? Perhaps
convert the number to `int()` or use `__index__()`, which will throw an
exception if needed.
Ah, thanks for the pointer to __index__! That's exactly what I was
looking for. In a first version, I was using int(), but then "10963"
was accepted.
I left {{{_check_trac_number}}} though, since someone had taken the
time to write a nice error message, and a .__index__ AttributeError is
not super informative in this case.
Oh, big improvement: now the number must be bigger than 1 :-)
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/15757#comment:13>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.