if <assignment>:

Paul Wright -$P-W$- at verence.demon.co.uk
Tue Nov 26 07:16:25 EST 2002


In article <artvr3$cbe$2 at wheel2.two14.net>,  <maney at pobox.com> 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, or is this as well-founded as the
>hysterical wails about how Python's use of indentation is just wrong? 
>It certainly isn't remotely near my own experience (which covers a bit
>more than two decades, during much of which C was used more than
>anything else).

This is a regular question on comp.lang.python. There's another thread
on this where I've posted some statistics from a study which found that
that feature caused errors roughly once in every 3000 lines of code:
<http://groups.google.com/groups?selm=9q171k%244lq%241%40verence.demon.co.uk>

Assignment in expressions is banned in C written for some safety related
applications for that reason.

-- 
Paul Wright | http://pobox.com/~pw201 |



More information about the Python-list mailing list