Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'prints': 0.07; 'defined.': 0.09; 'from:addr:python': 0.09; 'def': 0.13; 'useful,': 0.13; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply- to:addr:python-list': 0.16; 'wrote:': 0.18; 'written': 0.19; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'right.': 0.25; 'function': 0.27; 'depends': 0.28; 'second': 0.28; 'example': 0.29; 'print': 0.29; 'does': 0.32; 'header:User-Agent:1': 0.33; 'received:84': 0.34; 'anything': 0.34; 'reply-to:addr:python.org': 0.34; 'probably': 0.35; 'to:addr:python-list': 0.35; '...': 0.35; 'something': 0.35; 'comment': 0.36; 'subject:]': 0.36; "i'd": 0.39; '(with': 0.39; 'called': 0.40; 'to:addr:python.org': 0.40; 'header:Reply-To:1': 0.70; 'reply-to:no real name:2**0': 0.72; 'imperative': 0.91 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=Dp/UCRD+ c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=qePWxsfFzlIA:10 a=-CCVtsq90SQA:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=mp_7UQt3dHhn_oTlmiQA:9 a=wPNLvfGTeEIA:10 a=MNNHs_nXZ_Z9_RTA:21 a=w_QUfm7wK0D-BPOA:21 a=0nF1XD0wxitMEM03M9B4ZQ==:117 X-AUTH: mrabarnett:2500 Date: Sat, 24 Mar 2012 20:24:37 +0000 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: verbs in comments [OT] References: <4f6e2265$0$1382$4fafbaef@reader2.news.tin.it> In-Reply-To: <4f6e2265$0$1382$4fafbaef@reader2.news.tin.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1332620684 news.xs4all.nl 6842 [2001:888:2000:d::a6]:60737 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:22124 On 24/03/2012 19:36, Kiuhnm wrote: > Why do you write > // Print the number of words... > def printNumWords(): ... > and not > // Prints the number of words... > def printNumWords(): ... > where "it" is understood? > Is that an imperative or a base form or something else? > The first is the imperative, the second is what it does (with the implied "it"). Which form you use depends on what "feels" right. Probably what I'd do is use the first form where it's called and the second form where it's defined. # Prints the number of words. def print_num_words(): ... # Print the number of words. print_num_words() Although in this example the function is better written with a docstring, and the comment where the function is called doesn't add anything useful, so it's probably unnecessary.