#12269: coercion and conversion for absolute_field
-----------------------------+----------------------------------------------
   Reporter:  mstreng        |          Owner:  davidloeffler                   
                                           
       Type:  defect         |         Status:  new                             
                                           
   Priority:  major          |      Milestone:  sage-5.0                        
                                           
  Component:  number fields  |       Keywords:  coercion conversion 
absolute_field number field structure relative absolute
Work_issues:                 |       Upstream:  N/A                             
                                           
   Reviewer:                 |         Author:                                  
                                           
     Merged:                 |   Dependencies:                                  
                                           
-----------------------------+----------------------------------------------

Comment(by SimonKing):

 Sorry, I did not answer Marco's question yet.

 Is it the case that the map is already known at initialisation time? Then,
 you could use (depending on whether you want a conversion or a coercion or
 an action) `sage.structure.parent.Parent.register_conversion(...)` or
 `...register_coercion(...)` or `...register_action(...)`. But note that it
 might be tricky to find the right moment for using these methods: They
 raise an error if the coercion framework was used before invoking the
 methods.

 If the maps are not available at initialisation time (or if otherwise
 initialisation takes too much time), you could implement either
 `_convert_map_from_` or `_coerce_map_from_` -- see the documentation of
 both methods in `sage.structure.parent.Parent` for the expected return
 values. The advantage is that the map would only be constructed when
 needed.

 Concerning "coercion or conversion between relative and absolute number
 fields", I think there has been at least one thread on sage-nt and also a
 trac ticket devoted to that subject.

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