2009/7/9 kj <no.em...@please.post>: > Thanks for the encouragement.
[snip] > into code. And by this I mean not only assumptions about the > correctness of their code (the typical scope of assertions), but > also, more broadly, assumptions about the data that they are dealing > with (which often comes from external sources with abysmal quality > control). There we diverge. A lot. If "correctness of the code trumps everything else" (in fact, if it matters at all) and the external data has "abysmal quality control" then it *must* be checked for correctness before it is used. If it is not, you have no idea whether your output is correct or not. And assertions *will* *not* reliably provide that checking (because they may not be executed). You *must* actively check the data, using good old-fasioned "if" statements and so on, because not to do so is to declare that you *don't* care about correctness. You *know* the input is often wrong, but you're not bothering to check it? -- Tim Rowe -- http://mail.python.org/mailman/listinfo/python-list