#15037: Badly formed error messages for ModularFormsRing constructor
---------------------------------+---------------------------------
       Reporter:  itaibn         |        Owner:
           Type:  defect         |       Status:  positive_review
       Priority:  minor          |    Milestone:  sage-5.12
      Component:  modular forms  |   Resolution:
       Keywords:                 |    Merged in:
        Authors:  John Cremona   |    Reviewers:  Frédéric Chapoton
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+---------------------------------

Comment (by jdemeyer):

 Replying to [comment:7 cremona]:
 > I could easily change that, and at the same time include chapoton's 4
 spaces into my patch, but are you sure?  If I give a ring as base_ring
 which happens not to be one of the rings allowed, that is surely an error
 in its Value not its Type?
 Well a ring like `RR` is really a type which is not allowed, so that would
 be clearly a `TypeError`. Perhaps you could argue that `GF(9)` should be a
 `ValueError` since it's a finite field (an allowed type) but with the
 wrong number of elements. But for simplicity, I think a `TypeError` there
 would be okay. Technically speaking, even `GF(3)` and `GF(9)` are
 different Python types, so the `TypeError` in all cases is certainly
 defensible:
 {{{
 sage: type(GF(3))
 <class
 
'sage.rings.finite_rings.finite_field_prime_modn.FiniteField_prime_modn_with_category'>
 sage: type(GF(9,'a'))
 <class
 'sage.rings.finite_rings.finite_field_givaro.FiniteField_givaro_with_category'>
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15037#comment:8>
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.

Reply via email to