variable hell

Steve Holden steve at holdenweb.com
Thu Aug 25 12:48:37 EDT 2005


Carsten Haese wrote:
> On Thu, 2005-08-25 at 11:04, I hastily wrote:
> 
>>On Thu, 2005-08-25 at 10:43, Nx wrote:
>>
>>>Thanks for the many replies
>>>
>>> here is an example for what it will be used for , in this case
>>> fixed at 31 fieldvalues:
>>>
>>> inputvalues=(s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,
>>>        s26,s27,s28,s29,s30,s31)
>>
>>inputvalues = tuple(mylist)
> 
> 
> And actually, you probably don't have to do that, because the execute
> method should be able to handle a list just as well as a tuple.
> 
That depends on the database module. Some will insist in tuples, IIRC.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/




More information about the Python-list mailing list