if <assignment>:
Simon Wittber (Maptek)
Simon.Wittber at perth.maptek.com.au
Mon Nov 25 23:30:16 EST 2002
In article <kps5uugnftv0jk2c23sm8v96gcv9l3n2kc at 4ax.com>, Courageous
wrote:
>>>David Brown <david at no.westcontrol.spam.com> wrote:
>>>> correctness. This particular "feature" is a huge source of bugs
and
>>>> frustration in C programming - mixing up "=" and "==" in conditions
>>>> is probably the biggest single cause of C program bugs. Python, on
>>>> the other
>>>
>>>Are you speaking from experience,...
>>
>> In my own personal experience, the most common typo I make in C like
>> languages is the =/== error. I'm lucky enough to generally see this
>> error before I send it to the compiler and fool myself into thinking
>> the code is good.
>Gcc is pretty good about warning the user when that happens. At least
it
>seems to catch it most of the times when I do it -- but it's still not
>100%.
I remember in my TurboC++ 2.0 days, the compiler would spit out
'Ambiguous assignment' or something like that anyway. I always found the
construct if(x = func()) rather confusing, and *never* used it, even
though
it was available and acceptable to do so.
Sw.
More information about the Python-list
mailing list