Re: [Rpy] [patch] allow do_slot_assign to create new attributes

2009-02-09 Thread Laurent Gautier
Good catch. I suspect an overzealous copy/paste here. L. Nathaniel Smith wrote: > Currently, the following generates an exception: > s = ri.SexpVector([1, 2, 3, 4], ri.INTSXP) s.do_slot_assign("dim", ri.SexpVector([2, 2], ri.INTSXP) > > The issue is that s has no "dim" attribute to st

[Rpy] [patch] allow do_slot_assign to create new attributes

2009-02-08 Thread Nathaniel Smith
Currently, the following generates an exception: >>> s = ri.SexpVector([1, 2, 3, 4], ri.INTSXP) >>> s.do_slot_assign("dim", ri.SexpVector([2, 2], ri.INTSXP) The issue is that s has no "dim" attribute to start off with, and do_slot_assign's implementation checks R_has_slot and errors out if it ret