Re: getlist question

2009-12-26 Thread Victor Subervi
On Fri, Dec 25, 2009 at 8:28 PM, Steven D'Aprano < st...@remove-this-cybersource.com.au> wrote: > On Fri, 25 Dec 2009 12:59:20 -0500, Benjamin Kaplan wrote: > > > On Fri, Dec 25, 2009 at 12:40 PM, Victor Subervi > > wrote: > >> > >> It returns nothing. I believe I've stated that three times now.

Re: getlist question

2009-12-25 Thread Steven D'Aprano
On Fri, 25 Dec 2009 12:59:20 -0500, Benjamin Kaplan wrote: > On Fri, Dec 25, 2009 at 12:40 PM, Victor Subervi > wrote: >> >> It returns nothing. I believe I've stated that three times now. > > In Python, that's not possible. Every function returns something. Unless it raises an exception. >

Re: getlist question

2009-12-25 Thread Victor Subervi
On Fri, Dec 25, 2009 at 12:59 PM, Benjamin Kaplan wrote: > On Fri, Dec 25, 2009 at 12:40 PM, Victor Subervi > wrote: > > > > It returns nothing. I believe I've stated that three times now. > > In Python, that's not possible. Every function returns something. If > you think it returns nothing, it

Re: getlist question

2009-12-25 Thread Benjamin Kaplan
On Fri, Dec 25, 2009 at 12:40 PM, Victor Subervi wrote: > > It returns nothing. I believe I've stated that three times now. In Python, that's not possible. Every function returns something. If you think it returns nothing, it probably returns None. >>> def foo() : pass ... >>> a = foo() >>> prin

Re: getlist question

2009-12-25 Thread Carsten Haese
Victor Subervi wrote: > On Fri, Dec 25, 2009 at 11:35 AM, Carsten Haese > wrote: > > Victor Subervi wrote: > > Well I've done that. What happens is the storeColNames registers the > > "Availability" field naturally enough; however, as I stated > bef

Re: getlist question

2009-12-25 Thread Victor Subervi
On Fri, Dec 25, 2009 at 11:35 AM, Carsten Haese wrote: > Victor Subervi wrote: > > Well I've done that. What happens is the storeColNames registers the > > "Availability" field naturally enough; however, as I stated before, the > > getlist doesn't fetch anything because there is nothing to fetch!

Re: getlist question

2009-12-25 Thread Carsten Haese
Victor Subervi wrote: > Well I've done that. What happens is the storeColNames registers the > "Availability" field naturally enough; however, as I stated before, the > getlist doesn't fetch anything because there is nothing to fetch! No > such value is passed! Well, what does getlist return when

Re: getlist question

2009-12-25 Thread Victor Subervi
On Thu, Dec 24, 2009 at 6:32 PM, MRAB wrote: > Victor Subervi wrote: > > On Thu, Dec 24, 2009 at 3:28 PM, MRAB > pyt...@mrabarnett.plus.com>> wrote: >> >>Victor Subervi wrote: >> >>Hi; >>I have the following code: >> >> try: >> trueVal = form.getlist

Re: getlist question

2009-12-24 Thread MRAB
Victor Subervi wrote: On Thu, Dec 24, 2009 at 3:28 PM, MRAB > wrote: Victor Subervi wrote: Hi; I have the following code: try: trueVal = form.getlist(storeColNames[i]) colNames.append(storeColName

Re: getlist question

2009-12-24 Thread Victor Subervi
On Thu, Dec 24, 2009 at 3:28 PM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> I have the following code: >> >> try: >>trueVal = form.getlist(storeColNames[i]) >>colNames.append(storeColNames[i]) >>if len(trueVal) > 1: >> trueVal = string.join(trueVal, ',')

Re: getlist question

2009-12-24 Thread MRAB
Victor Subervi wrote: Hi; I have the following code: try: trueVal = form.getlist(storeColNames[i]) colNames.append(storeColNames[i]) if len(trueVal) > 1: trueVal = string.join(trueVal, ',') Unless you're using a very old version of Python, you should be

Re: getlist question

2009-12-24 Thread Emile van Sebille
On 12/24/2009 12:05 PM Victor Subervi said... Hi; I have the following code: try: trueVal = form.getlist(storeColNames[i]) colNames.append(storeColNames[i]) if len(trueVal) > 1: trueVal = string.join(trueVal, ',') values.append(trueVal)

getlist question

2009-12-24 Thread Victor Subervi
Hi; I have the following code: try: trueVal = form.getlist(storeColNames[i]) colNames.append(storeColNames[i]) if len(trueVal) > 1: trueVal = string.join(trueVal, ',') values.append(trueVal) elif len(trueVal) == 1: print storeColN