Extending classes __init__behavior for newbies

James Mills prologic at shortcircuit.net.au
Tue Feb 15 16:10:40 EST 2011


On Tue, Feb 15, 2011 at 1:44 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> I don't. If you (generic you) have separate "write the code" and "test
> the code" phases, your project is in trouble. You can probably get away
> with it if it's a tiny throw-away script, but for anything more
> substantial, you should be testing *as you are writing*. The two need to
> go in parallel.
>
> I don't follow full-blown test driven development where you write the
> test before you write the code, but still, the time to find out your
> infrastructure is fundamentally broken is *before* you have finished it,
> not three months later when you have built the entire app on top of it.

Perhaps I should have clarified. I agreed only with the
fact that if you spend more time in "careful" design
you might spend less time fixing "defects".

Agreed, test-driven development tends to lend itself
to higher quality code.

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"



More information about the Python-list mailing list