Why not allow empty code blocks?
Rustom Mody
rustompmody at gmail.com
Sun Jul 24 23:20:16 EDT 2016
On Monday, July 25, 2016 at 8:42:21 AM UTC+5:30, Chris Angelico wrote:
> On Mon, Jul 25, 2016 at 12:48 PM, Michael Torrie wrote:
> > Far more often I'm bitten by the dynamic nature of Python (would happen
> > in any dynamic language). I'll be using a particular member attribute
> > which I accidentally misspell somewhere and sometimes that results in
> > silent failure. Something doesn't work, but no exception is thrown.
> > Unit tests, and perhaps lint, are required to catch these errors. That
> > is one thing about a dynamic language: comprehensive testing is required
> > as you go along.
> >
>
> To be quite honest, comprehensive testing is needed in more static
> languages too. There are certain categories of error which can be
> detected by a compiler/linter, and certain which cannot; a language
> that forces you to declare variables will catch variable name
> misspellings, but only if they don't land you on an existing variable,
> and still won't catch the dynamic places like dict keys (imagine
> getting a block of JSON from somewhere, converting it into a
> dictionary, and looking up stuff in it - the compiler can't know
> whether your incoming data is correct and your code wrong, or the
> other way around). A language with less dynamism might be able to
> catch more, but still not everything,
So far — Fine!
> so ultimately, it all comes down to testing anyway.
All??
There is a famous quote by Dijkstra:
«Testing shows the presence, not the absence of bugs»
Or if you prefer things of a more ‘practical’ (so-called_ nature:
http://www.testingexcellence.com/reasons-automated-tests-fail-to-find-regression-bugs/
More information about the Python-list
mailing list