Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It looks like you can do it via the libgap library interface:

sage: w = libgap.eval('rec( a := 1, b := "deux" );')
sage: w['a']
1
sage: w['b']
"deux"
sage: w2 = libgap({'a':1,'b':'deux'})
sage: w == w2
True

(note that gap records are quite like associative arrays, so letting them correspond to python dicts seems a reasonable interface design. It doesn't look like this mapping was taken into consideration in the pexpect based interface)