#7890: [with patch, needs work] Improve conversion of GAP objects into sage
objects.
-------------------------------------+--------------------------------------
       Reporter:  jlopez             |         Owner:  was       
           Type:  defect             |        Status:  needs_work
       Priority:  major              |     Milestone:            
      Component:  interfaces         |    Resolution:            
       Keywords:                     |   Work issues:            
Report Upstream:  N/A                |     Reviewers:            
        Authors:  Javier López Peña  |     Merged in:            
   Dependencies:                     |      Stopgaps:            
-------------------------------------+--------------------------------------

Comment (by jlopez):

 Hi William,

 yeah, sorry about that. I changed jobs in 2010 and my whole work plan went
 south.
 I would like to get this thing working eventually, but I don't believe the
 approach I was trying is a good one. The lack of types in GAP creates some
 ambiguity in gap elements that can have different parents and where a
 choice needs to be made.

 Probably a better approach would be to provide an optional argument
 `sage_parent` to the `_sage_` function in GapElement, and then put the
 heavy lift into the sage parent where an ad-hoc gap-to-sage function can
 be defined, something like this:

 {{{
 def _sage_(self, sage_parent = None) {
     if sage_parent is not None:
         return sage_parent._call_from_gap(self)
     else:
         .... # The function as it used to work
 }
 }}}

 In this way, anyone creating a sage structure could implement their own
 "take an element from gap here" function rather than mess up with the
 interface. How does that sound?

 In any case it might make sense to wait a little bit and get GAP 4.5
 working first, as it seems [http://www.gap-
 system.org/Manuals/doc/changes/chap2.html the representation of some
 objects has changed].

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