PS: A nicer way to create the libgap record from Python than evaluating 
strings is to hand it a Python dict:  libgap(dict(a=1, b=2))


On Wednesday, October 1, 2014 11:28:20 PM UTC+1, Volker Braun wrote:
>
> On Wednesday, October 1, 2014 11:03:18 PM UTC+1, Simon King wrote:
>>
>> On 2014-10-01, Dima Pasechnik <[email protected]> wrote: 
>> >>   sage: R = libgap.eval('rec(a:=1, b:=2)') 
>> >>   sage: R.RecFields()   # So, creating the record did work 
>> >>   [ "b", "a" ] 
>> > 
>> > R is a Python dictionary 
>>
>> No, it isn't. 
>>   sage: type(R) 
>>   <type 'sage.libs.gap.element.GapElement_Record'> 
>> but... 
>
>
> Libgap records behaves like a Python dict, and libgap lists behave like 
> Python lists. They are of course not, strictly speaking, the same.
>
> You can also use R.sage() to convert the record to a Python dict.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to