Reference count question

Fredrik Lundh fredrik at pythonware.com
Thu Feb 3 02:36:59 EST 2005


John Machin wrote:

>> you should check the return value, though.  PyList_SetItem may (in
>> theory) fail.
>
> :-)
> Only a bot could say that. We mere mortals have been known to do things
> like (a) pass a non-list as the first argument (b) pass an out-of-range
> value for the second argument.

even for trivial code fragments like the one in the original post?

</F> 






More information about the Python-list mailing list