Re: Clearing the contents of a dictionary

2020-05-26 Thread 'Andy Wokula' via vim_dev
Am 25.05.2020 um 22:35 schrieb Bram Moolenaar: Yegappan wrote: To clear the contents of a list named "abc", we can use "unlet abc[:]". It looks like a similar method for clearing the contents of a dictionary is not available. We can set the dictionary variable to another e

Re: Clearing the contents of a dictionary

2020-05-25 Thread Bram Moolenaar
Yegappan wrote: > To clear the contents of a list named "abc", we can use "unlet abc[:]". > It looks like a similar method for clearing the contents of a dictionary > is not available. We can set the dictionary variable to another empty > dictionary (but i

Re: Clearing the contents of a dictionary

2020-05-24 Thread Yegappan Lakshmanan
Hi, On Sun, May 24, 2020 at 8:37 PM Pavol Juhas wrote: > How about filter(d, “0”) ? > To my understanding it clears the dictionary in place. > Yes. Good idea. This does clear all the items in the dict. But for consistency reasons, it will be useful to have unlet also support clearing all the i

Re: Clearing the contents of a dictionary

2020-05-24 Thread Pavol Juhas
How about filter(d, “0”) ? To my understanding it clears the dictionary in place. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this

Re: Clearing the contents of a dictionary

2020-05-24 Thread Yegappan Lakshmanan
let abc[:]". > > It looks like a similar method for clearing the contents of a dictionary > > is not available. We can set the dictionary variable to another empty > > dictionary (but it is not the same). Am I missing something? > > > > Thanks, > > Yegappan >

Re: Clearing the contents of a dictionary

2020-05-24 Thread Tony Mechelynck
On Mon, May 25, 2020 at 2:15 AM Yegappan Lakshmanan wrote: > > Hi, > > To clear the contents of a list named "abc", we can use "unlet abc[:]". > It looks like a similar method for clearing the contents of a dictionary > is not available. We can set th

Clearing the contents of a dictionary

2020-05-24 Thread Yegappan Lakshmanan
Hi, To clear the contents of a list named "abc", we can use "unlet abc[:]". It looks like a similar method for clearing the contents of a dictionary is not available. We can set the dictionary variable to another empty dictionary (but it is not the same). Am I missing somethin