Irmen de Jong wrote:
I don't see how that is opposed to what Grant was saying. It's that these 'contracts' tend to change and that people forget or are too lazy to update the comments to reflect those changes.
However, I can't see that deleting the comment documenting the contract can be the right response to the situation. If the contract comment doesn't match what code does, then there are two possibilities -- the comment is wrong, or the code is wrong. The appropriate response is to find out which one is wrong and fix it. If you simply delete the comment, then you're left with no redundancy to catch the fact that something is wrong. -- Greg -- http://mail.python.org/mailman/listinfo/python-list