Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #22128

Re: verbs in comments [OT]

References <4f6e2265$0$1382$4fafbaef@reader2.news.tin.it> <718EB1AF094B43D99E697086DE9B5192@gmail.com>
Date 2012-03-25 09:36 +1100
Subject Re: verbs in comments [OT]
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.961.1332628608.3037.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Mar 25, 2012 at 7:32 AM, Colton Myers <colton.myers@gmail.com> wrote:
>
> // Print the number of words...
> // Prints the number of words...
>
> 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.

It's funny how these things go. There are multiple distinct
conventions, and regarding function definition comments (or
docstrings), both of those do definitely exist. I think I've seen more
code in the second form ("this is what this code does"), but both are
prevalent.

Regarding git commit messages, the convention generally is to write in
the present tense ("this is what this commit does"), but on a wiki,
edit summaries are more often in the past tense ("this is what I
edited"). Why? Because on a wiki, nobody's going to 'git cherry-pick'
the edits.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

verbs in comments [OT] Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-24 20:36 +0100
  Re: verbs in comments [OT] MRAB <python@mrabarnett.plus.com> - 2012-03-24 20:24 +0000
    Re: verbs in comments [OT] Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-24 22:15 +0100
  Re: verbs in comments [OT] Chris Angelico <rosuav@gmail.com> - 2012-03-25 09:36 +1100
    Re: verbs in comments [OT] Roy Smith <roy@panix.com> - 2012-03-24 19:27 -0400
  Re: verbs in comments [OT] Jean-Michel Pichavant <jeanmichel@sequans.com> - 2012-03-26 14:36 +0200

csiph-web