Hi,

In C/C++ I got used to  write an expression like so:

#define TEST 0

if (TEST == value) 
{

}

in order to avoid the usual bug:
if (value = TEST)
{

}

In a relatively similar domain, I spent a few hours find this bug:

value == self.Get_Value()
if value == WHATEVER:
   do this

instead of
value = self.Get_Value()
if value == WHATEVER:
   do this

Is there a way to avoid such a bug with some type of construct ?

Thanks,
hg


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to