On Wed, 25 Oct 2006 at 9:16am, Nikolai Weibull wrote: > On 10/25/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote: > > > > Here is a patch that adds set() function on the lines of existing get() > > for setting list elements by index or dict keys by name. The reason I > > wanted this is the lack of support to use :let for modifying the > > dictionary elements. E.g., the below will be an error: > > > > :let get_dict().key = 'val' > > > > The alternative is to use the new set() function as: > > > > :call set(get_dict(), 'key', 'val') > > Wouldn't it be better to allow the :let syntax you describe above? It > shouldn't be impossible to parse that kind of expression.
- A set() function will be nice to have anyway (to balance out get()) - Adding a function is much easier (at least for me as a newbie) and the change is more isolated than changing the syntax of the :let command. This also means better likely hood of getting incorporated sooner. - The last time the :let syntax was discussed, I don't think Bram agreed to fix this issue, which indicates he is not in favor of that, and so less likelyhood to get incorporated. BTW, I noticed that I had the min args as 2 (copied from f_get) which is wrong, it should be 3. I can send another patch, again if Bram is OK with this change at all. -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com