getlist question
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Fri Dec 25 20:28:04 EST 2009
On Fri, 25 Dec 2009 12:59:20 -0500, Benjamin Kaplan wrote:
> On Fri, Dec 25, 2009 at 12:40 PM, Victor Subervi
> <victorsubervi at gmail.com> 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.
> If you
> think it returns nothing, it probably returns None.
Very possibly, but this is Victor you're talking too, and as far as I can
tell he hasn't shown his actual code. For all we know he has something
like this:
alist = [1, 2, 3]
try:
result = alist[100]
except:
pass
print result
See? Nothing is returned as the result.
--
Steven
More information about the Python-list
mailing list