Re: Assignments and Variable Substitution

2007-08-14 Thread Ali
On Aug 14, 12:45 am, Steve Holden [EMAIL PROTECTED] wrote: Evan Klitzke wrote: On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var And why would you want a variable whose name is '123'? ... and thus continues the search for private

Re: Assignments and Variable Substitution

2007-08-14 Thread Bruno Desthuilliers
Ali a écrit : On Aug 14, 12:45 am, Steve Holden [EMAIL PROTECTED] wrote: Evan Klitzke wrote: On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var And why would you want a variable whose name is '123'? ... and thus continues the search

Re: Assignments and Variable Substitution

2007-08-14 Thread brad
Steve Holden wrote: Evan Klitzke wrote: On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. You can't assign a

Assignments and Variable Substitution

2007-08-13 Thread brad
I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. Thanks, Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Assignments and Variable Substitution

2007-08-13 Thread srage
On Aug 13, 1:00 pm, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. Thanks, Brad You probably want to use a dictionary

Re: Assignments and Variable Substitution

2007-08-13 Thread Evan Klitzke
On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. You can't assign a variable whose name is 123, but you can do

Re: Assignments and Variable Substitution

2007-08-13 Thread Steve Holden
Evan Klitzke wrote: On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. You can't assign a variable whose name