Python style: to check or not to check args and data members
Joel Hedlund
joel.hedlund at gmail.com
Fri Sep 1 14:59:03 EDT 2006
> You might try doctests, they can be easier to write and fit into the
> unit test framework if needed.
While I firmly believe in keeping docs up to date, I don't think that
doctests alone can solve the problem of maintaining data integrity in
projects with more comlex interfaces (which is what I really meant to
talk about. Sorry if my simplified examples led you to believe
otherwise). For simple, deterministic functions like math.pow I think
it's great, but for something like BaseHTTPServer... probably not. The
__doc__'s required would be truly fascinating to behold. And probably
voluminous and mostly unreadable for humans. Or is there something that
I've misunderstood?
/Joel
More information about the Python-list
mailing list