verbs in comments [OT]

Colton Myers colton.myers at gmail.com
Sat Mar 24 16:32:14 EDT 2012


> 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?
> 
> 

I've seen it both ways, and I don't think anyone will fault you for either.  I usually use the first version, "commanding" the code to do what I want.  It's also a habit because that's the form one uses in git commit messages. 

-Colton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120324/3b8b884b/attachment.html>


More information about the Python-list mailing list