#16750: libgap fails converting char GapElements to Sage
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:
           Type:  defect             |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  interfaces         |   Resolution:
       Keywords:  conversion,        |    Merged in:
  string                             |    Reviewers:  Ralf Stephan
        Authors:  Volker Braun       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  843ba48dc7753d79e51ea61e7e2ec3daa9149878
  u/vbraun/libgap_fails_converting_string_gapelements_to_sage|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by rws):

 * status:  needs_review => positive_review


Comment:

 The `sage()` member function of `T_CHAR` will be passed to parent because
 no `T_CHAR` child is implemented.
 {{{
 sage: ans=libgap.eval("UnorderedTuples(['a', 'b', 'c'],2)"); ans
 [ "aa", "ab", "ac", "bb", "bc", "cc" ]
 sage: a=ans[0]; a
 "aa"
 sage: a[0]
 'a'
 sage: type(_)
 <type 'sage.libs.gap.element.GapElement'>
 sage: a[0]._type_number()
 (9L, 'T_CHAR')
 sage: a[0].sage()
 Traceback (most recent call last):
   File "<ipython-input-50-b805c595d1a5>", line 1, in <module>
     a[Integer(0)].sage()
   File "element.pyx", line 1024, in sage.libs.gap.element.GapElement.sage
 (build/cythonized/sage/libs/gap/element.c:8749)
 NotImplementedError: cannot construct equivalent Sage object
 }}}
 I have changed your patch according to my belief what went wrong. If you
 disagree then, well, fix it yourself 8)

--
Ticket URL: <http://trac.sagemath.org/ticket/16750#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/d/optout.

Reply via email to