Re: variables with dynamicly generated names

2006-12-14 Thread Gabriel Genellina
At Thursday 14/12/2006 05:50, avlee wrote: Is it possible to use in python variables with dynamicly created names ? How ? Use a dictionary: d = {} d[almost_arbitrary_key] = value -- Gabriel Genellina Softlab SRL __ Correo Yahoo! Espacio par

Re: variables with dynamicly generated names

2006-12-14 Thread Paul Rubin
avlee <[EMAIL PROTECTED]> writes: > Is it possible to use in python variables with dynamicly created names ? Yes, but don't. > How ? You almost certainly want to use something like a dictionary instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: variables with dynamicly generated names

2006-12-14 Thread Diez B. Roggisch
avlee schrieb: > Hello > > Is it possible to use in python variables with dynamicly created names ? > How ? In such cases, use a dictionary: vars = {} for some_name, some_value in some_values_generating_thing(): vars[some_name] = some_value Diez -- http://mail.python.org/mailman/listinf

variables with dynamicly generated names

2006-12-14 Thread avlee
Hello Is it possible to use in python variables with dynamicly created names ? How ? Thanx -- http://mail.python.org/mailman/listinfo/python-list