if <assignment>:

maney at pobox.com maney at pobox.com
Wed Nov 27 00:55:40 EST 2002


Paul Wright <-$P-W$- at verence.demon.co.uk> wrote:
> This is a regular question on comp.lang.python.

Yes, it does seem to cause new-to-Python programmers a fair bit of
confusion, doesn't it?  Everything is going along so nicely, then you
hit a block of code where you want to do this really very simple thing,
and all of a sudden Python is being less helpful than C.  Of course tou
find this worthy of comment: it's so unusual!

> 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>

You might want to read Hatton's description of that again - the
accurate one in chapter four, not the wooly one earlier on.  He makes
it quite clear that the statistics merely count the occurences of
patterns he considers error-prone, not actual errors per se.  Some of
the occurences may be errors, but Hatton provides fuck-all in the way
of hard data on that score.  That lack was, I think, the main reason
_Safer C_ has been stuck on a back shelf all these years... though the
fact that I've been moving away from using C so much over those years
must be a factor as well.  :-)

None of which should deter anyone who has to use C from reading _Safer
C_, for there is a great deal of merit to it.



More information about the Python-list mailing list