Python style: to check or not to check args and data members

Joel Hedlund joel.hedlund at gmail.com
Fri Sep 1 20:10:02 EDT 2006


> Oh, I was just addressing your bit about not knowing unit tests.
> Doctests can be quicker to put together and have only a small learning
> curve.

OK, I see what you mean. And you're right. I'm struggling mightily right 
now with trying to come up with sane unit tests for a bunch of 
generalized parser classes that I'm about to implement, and which are 
supposed to play nice with each other... Gah! But I'll get there 
eventually... :-)

> On the larger scale, I too advocate extensive checking of 'tainted'
> data from 'external' sources, then assuming 'clean' data is as expected
> and doing no explicit further data checks, after all, you've got to
> trust your development team/yourself.

Right.

Thanks for helpful tips and insights, and for taking the time!

Cheers!
/Joel



More information about the Python-list mailing list