Reference count question

John Machin sjmachin at lexicon.net
Wed Feb 2 18:17:23 EST 2005


Fredrik Lundh wrote:
>
> >    PyList_SetItem(List,i,Str);
>
> 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.
(-:




More information about the Python-list mailing list