does lack of type declarations make Python unsafe?

Moshe Zadka m at
Tue Jun 17 03:37:16 CEST 2003

On Mon, 16 Jun 2003, Peter Hansen <peter at> wrote:

> Don't mistake me for the XP community.  I'm just me.

Your attitude is, however, typical :)

> I shortened it from a previous post, in which I continued 
> "Source code with good unit and acceptance tests is an asset."
> Sounds like you wouldn't agree.

Right, I wouldn't. Source code is *always* a liability. Unless you
think the unit tests and acceptance tests make it bug-free, I don't
see *why* you wouldn't happily delete it the moement it proves to be

> For my company, it's very clear that it's true, however, so I guess
> once again (surprise!) I speak only for myself.  :-)

I doubt it is true, even for your company. Source code is *always*
a liability, unit-tests or no unit-tests. It is an *acceptable*
liability, sometimes, if you get enough functionality out of it.
Insofar as tests measure functionality, they are useful to make sure
you have no code which does not give functionality. 

> I agree.  Good thing we don't actually *always* write tests, nor
> always write them first.  ;-)

That sort of makes your methodology from "TDD" to "Sometimes TDD,
if it looks like the right thing". So preaching TDD while not
practicing it is...well...

> Don't mistake strong claims for religion either...  I make them
> to spur the truly test-less on to consider and investigate and
> practice writing tests, because _they_ are the ones who are 
> writing crappy code, not you, who might understand when to test 
> and when not to test.

It's better to teach people the truth, no? Instead of teaching them
about some rosy place which doesn't exist. I feel you are doing
unit-testing a disservice: if someone buys into it, and finds that
it isn't a win always, he'll just assume that it is worth nothing.
In fact, I assumed tests are worth nothing after finding some glaring
holes in XP's logic, and it took me a long time to be convinced that
they are ever helpful. Assuming there are others like me, it is better
to be honest about the limitations of technology first :)
Moshe Zadka --
Buffy: I don't like you hanging out with someone that... short.
Riley: Yeah, a lot of young people nowadays are experimenting with shortness.
Agile Programming Language --

More information about the Python-list mailing list