Re: a simple def how-to

2010-03-07 Thread Stefan Behnel
vsoler, 07.03.2010 16:05: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like... ranges=['book','house','table','read'] fo

Re: a simple def how-to

2010-03-07 Thread Steven D'Aprano
On Sun, 07 Mar 2010 07:05:26 -0800, vsoler wrote: > Hello, > > My script starts like this: > > book=readFromExcelRange('book') > house=readFromExcelRange('house') > table=readFromExcelRange('table') > read=readFromExcelRange('read') > ... > > But I would like to have something equivalent, like.

Re: a simple def how-to

2010-03-07 Thread John Posner
On 3/7/2010 10:59 AM, vsoler wrote: Thank you for your help. Perhaps the solution you are suggesting is not exactly what I was looking for, but helped anyway. Oops, I was thinking list, not dict. Too fast, and not enough coffee! -John -- http://mail.python.org/mailman/listinfo/python-list

Re: a simple def how-to

2010-03-07 Thread vsoler
On 7 mar, 16:23, John Posner wrote: > On 3/7/2010 10:05 AM, vsoler wrote: > > > > > Hello, > > > My script starts like this: > > > book=readFromExcelRange('book') > > house=readFromExcelRange('house') > > table=readFromExcelRange('table') > > read=readFromExcelRange('read') > > ... > > > But I wou

Re: a simple def how-to

2010-03-07 Thread vsoler
On 7 mar, 16:23, Andreas Waldenburger wrote: > On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler > > > > wrote: > > Hello, > > > My script starts like this: > > > book=readFromExcelRange('book') > > house=readFromExcelRange('house') > > table=readFromExcelRange('table') > > read=readFromExcelRange('

Re: a simple def how-to

2010-03-07 Thread John Posner
On 3/7/2010 10:05 AM, vsoler wrote: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like... ranges=['book','house','table',

Re: a simple def how-to

2010-03-07 Thread Andreas Waldenburger
On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler wrote: > Hello, > > My script starts like this: > > book=readFromExcelRange('book') > house=readFromExcelRange('house') > table=readFromExcelRange('table') > read=readFromExcelRange('read') > ... > > But I would like to have something equivalent,

a simple def how-to

2010-03-07 Thread vsoler
Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like... ranges=['book','house','table','read'] for i in ranges: var[i]=re