On Mon, 06 Jun 2011 12:52:31 -0400, Terry Reedy wrote: > Let me add something not said much here about designing functions: start > with both a clear and succinct definition *and* test cases. (I only > started writing tests first a year ago or so.)
For any non-trivial function, I usually start by writing the documentation (a docstring and doctests) first. How else do you know what the function is supposed to do if you don't have it documented? By writing the documentation and examples before the code, I often discover that the API I first thought of was rubbish :) -- Steven -- http://mail.python.org/mailman/listinfo/python-list