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

Paddy paddy3118 at netscape.net
Fri Sep 1 14:18:20 EDT 2006


Joel Hedlund wrote:
>
> Hmmm... So. I should build grimly paranoid parsers for external data, use
> duck-typed interfaces everywhere on the inside, and simply callously
> disregard developers who are disinclined to read documentation? I could do that.
>
>  > if you're really serious, unit tests is the way to go - they can check
>  > for much more than just types.
>
> Yes, I'm very much serious indeed. But I haven't done any unit testing. I'll
> have to check into that. Thanks!
>

You might try doctests, they can be easier to write and fit into the
unit test framework if needed.
http://en.wikipedia.org/wiki/Doctest

- Paddy.




More information about the Python-list mailing list