Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: The worth of comments Date: Sun, 29 May 2011 12:47:52 +1200 Lines: 19 Message-ID: <94djdoFt6U1@mid.individual.net> References: <87sjs0apgh.fsf@benfinney.id.au> <4ddfd9bf$0$49183$e4fe514c@news.xs4all.nl> <4de1011f$0$49184$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Pqyp9fowkcKctIJ+cDTLpQbqgGuemiT+LnSxpO9vry2GQJ4gTt Cancel-Lock: sha1:YiJayT4YJ9e5NBY1fL8lruKC+EM= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <4de1011f$0$49184$e4fe514c@news.xs4all.nl> Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6504 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