Awkwardness of C API for making tuples

Jeremy Bowers jerf at jerf.org
Thu Feb 3 14:25:15 EST 2005


On Thu, 03 Feb 2005 07:45:22 -0500, Steve Holden wrote:

> Fredrik Lundh wrote:
>> in theory, if PyInt_FromLong succeeds, and PyTuple_SetItem fails, you'll leak
>> an object.
>> 
>> </F> 
>> 
> And in practice this will only happen during a period when you are 
> relying critically on it *not* to ...

One of the steps to attaining the Tao of Programming is to entirely stop
caring what happens when your program runs, thus completely eliminating
this class of bugs. A programmer who has the Tao never critically relies
on a program, and thus the program, knowing that it can not spite the
programmer in this way, does not try.



*.5-wink* - I meant it as a joke but as I thought about it it started to
make sense, especially the first clause of the last sentence, which I
suppose means the Tao may actually be speaking through me without my
knowledge or intent...



More information about the Python-list mailing list