> it's much more useful to write out the complete test case without > preconceptions, without the aid of the code you're trying to test. > This works because:
> * Writing out the test cases first can help in writing the > real function. > > Those test cases act as documentation that other people can look at. Can I echo that. After I saw your test output I immediately understood how the function was supposed to work. If you could have posted that sample input/output data along with the spec before writing the code we could have been much more helpful - I think... ;-) Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor