#9902: base_extend() not implemented in MPolynomialRing
-----------------------------------+----------------------------------------
   Reporter:  vbraun               |       Owner:  malb      
       Type:  defect               |      Status:  needs_info
   Priority:  major                |   Milestone:  sage-4.6.1
  Component:  commutative algebra  |    Keywords:            
     Author:  Volker Braun         |    Upstream:  N/A       
   Reviewer:                       |      Merged:            
Work_issues:                       |  
-----------------------------------+----------------------------------------
Changes (by novoselt):

  * status:  needs_review => needs_info


Comment:

 I am not quite sure it is the right approach. It seems to me that we have
 two methods: `change_ring` that constructs "the same object but over
 different ring" and `base_extend` which does the same, but only if there
 is a natural coercion. Given this description, it seems to me that there
 should be only one implementation of `base_extend` in the base class:
 {{{
 def base_extend(self, R):
     if R.has_coerce_map(self.base_ring()):
         return self.change_ring(R)
     else:
         raise TypeError("%s cannot be extened to %s!" % (self.base_ring(),
 R))
 }}}
 and then each derived class should implement `change_ring` only. (If the
 detailed error message breaks a lot of doctests I am fine with keeping the
 current one.) Thoughts?

 There is also discrepancy between actual argument names and their
 description in documentation (`base_ring` vs. `R`).

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

Reply via email to