Re: Adding to an Array inside a Dict

2010-10-11 Thread Arnaud Delobelle
MRAB writes: > On 11/10/2010 15:55, MacOSX @ Rocteur.cc wrote: >> Hi, >> >> Is there an easier way to do this, I am adding/creating to an array >> inside a dict but can find a cleaner way: >> >> So I first check if the key exists already, if it does then I know I use >> append, if it does not I c

Re: Adding to an Array inside a Dict

2010-10-11 Thread Robert Kern
On 10/11/10 1:29 PM, MRAB wrote: On 11/10/2010 15:55, MacOSX @ Rocteur.cc wrote: Hi, Is there an easier way to do this, I am adding/creating to an array inside a dict but can find a cleaner way: So I first check if the key exists already, if it does then I know I use append, if it does not I c

Re: Adding to an Array inside a Dict

2010-10-11 Thread MRAB
On 11/10/2010 15:55, MacOSX @ Rocteur.cc wrote: Hi, Is there an easier way to do this, I am adding/creating to an array inside a dict but can find a cleaner way: So I first check if the key exists already, if it does then I know I use append, if it does not I create it. if osmdict.has

Re: Adding to an Array inside a Dict

2010-10-11 Thread Robert Kern
On 10/11/10 9:55 AM, MacOSX @ Rocteur.cc wrote: Hi, Is there an easier way to do this, I am adding/creating to an array inside a dict but can find a cleaner way: So I first check if the key exists already, if it does then I know I use append, if it does not I create it. if osmdict.has

Adding to an Array inside a Dict

2010-10-11 Thread MacOSX @ Rocteur.cc
Hi, Is there an easier way to do this, I am adding/creating to an array inside a dict but can find a cleaner way: So I first check if the key exists already, if it does then I know I use append, if it does not I create it. if osmdict.has_key(token): osmdict[token]['user'].app