Peter Otten wrote: > To verify that the algorithm is correct now you could walk through > increasingly more complex sample data, which may be possible in this case, > but rarely ever for an entire script. Instead the common approach is to > pick a few samples along with the expected outcomes, feed them to your > function and verify that they give the expected output > > def unique_values(items): > ... > return uniq > > assert unique_values([42, 42]) == [42] > assert unique_values([1, 2, 3, 2]) == [1, 2, 3]
Thanks for the tip and where I was failing to see Togan _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor