On 04 Dec 2014 09:48:49 GMT
alb...@spenarnc.xs4all.nl (Albert van der Horst) wrote:
> In article <546d7505$0$12899$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
> >And the award for the most gratuitous comments before an import goes to
> >one of my (former) workmates, who wrote t
Many years ago I, too, had a couple of CS profs who forced us to include too
many (usually innocuous) comments in our Fortran and PL/1 code. Perhaps they
were trying to counter the natural programmer tendency of not commenting at all?
Forty years of programming later (yikes!), I try to use comm
- Original Message -
> From: sohcahto...@gmail.com
> I was trying to illustrate the point that some professors would
> demand you write code like this...
>
> # increment the line count
> lineCount += 1
>
> # Check if line count is over 10
> if lineCount > 10
> # Tell the user there ar
In article <546d7505$0$12899$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
>And the award for the most gratuitous comments before an import goes to
>one of my (former) workmates, who wrote this piece of code:
>
># Used for base64-decoding.
>import base64
># Used for ungzipping.
>imp
Marko Rauhamaa wrote:
> Marco Buttu :
>
>> To acknowledge the OP, the statistics module deserves to be taken as
>> example for writing good comments and docstrings:
>>
>> https://hg.python.org/cpython/file/3.4/Lib/statistics.py
>
> True, it is done with good style. It concentrates on documenting
Marco Buttu :
> To acknowledge the OP, the statistics module deserves to be taken as
> example for writing good comments and docstrings:
>
> https://hg.python.org/cpython/file/3.4/Lib/statistics.py
True, it is done with good style. It concentrates on documenting use and
lets the implementation do
On 21/11/2014 07:52, Marko Rauhamaa wrote:
sohcahto...@gmail.com:
>My point was that I was making fun of CS professors that demand a
>comment on every line of code, regardless of how clear the line of
>code is.
Unfortunately, a lot of software houses do a similar thing. Not quite
every line, b
On 2014-11-21, Marko Rauhamaa wrote:
> sohcahto...@gmail.com:
>
>> My point was that I was making fun of CS professors that demand a
>> comment on every line of code, regardless of how clear the line of
>> code is.
>
> Unfortunately, a lot of software houses do a similar thing. Not quite
> every l
sohcahto...@gmail.com:
> My point was that I was making fun of CS professors that demand a
> comment on every line of code, regardless of how clear the line of
> code is.
Unfortunately, a lot of software houses do a similar thing. Not quite
every line, but stuff like:
def write_line_to_file(f
On Fri, Nov 21, 2014 at 11:19 AM, wrote:
> On Thursday, November 20, 2014 4:17:33 PM UTC-8, Chris Angelico wrote:
>> It's about giving people proper credit for what they said.
>
> Fair enough.
Thank you. That's a nice, tidy attribution line, and it's clear who
said what. Including both name and
On Thursday, November 20, 2014 4:17:33 PM UTC-8, Chris Angelico wrote:
> On Fri, Nov 21, 2014 at 10:59 AM, wrote:
> >> (By the way, whatever tool you are using to post comments is badly breaking
> >> attributions. It is polite to give the person's full name when quoting
> >> them, when they provi
On Fri, Nov 21, 2014 at 10:59 AM, wrote:
>> (By the way, whatever tool you are using to post comments is badly breaking
>> attributions. It is polite to give the person's full name when quoting
>> them, when they provide one, if not give their full email address.
>> Truncating their email address
On Thursday, November 20, 2014 3:16:33 PM UTC-8, Steven D'Aprano wrote:
> sohcahto...@gmail.com wrote:
>
> > On Thursday, November 20, 2014 1:33:16 PM UTC-8, c...@isbd.net wrote:
> >> s...@gmail.com wrote:
> >> >
> >> > # increment x
> >> > x += 1
> >>
> >> But it shouldn't say 'increment x', it
On 20/11/2014 21:32, c...@isbd.net wrote:
sohcahto...@gmail.com wrote:
# increment x
x += 1
But it shouldn't say 'increment x', it should say 'add one to the line
count' or some such. Although changing the variable name to
'lineCount' would do almost as well.
Would you please clarify whet
sohcahto...@gmail.com wrote:
> On Thursday, November 20, 2014 1:33:16 PM UTC-8, c...@isbd.net wrote:
>> s...@gmail.com wrote:
>> >
>> > # increment x
>> > x += 1
>>
>> But it shouldn't say 'increment x', it should say 'add one to the line
>> count' or some such. Although changing the variable n
On Thursday, November 20, 2014 1:33:16 PM UTC-8, c...@isbd.net wrote:
> s...@gmail.com wrote:
> >
> > # increment x
> > x += 1
>
> But it shouldn't say 'increment x', it should say 'add one to the line
> count' or some such. Although changing the variable name to
> 'lineCount' would do almost as
sohcahto...@gmail.com wrote:
>
> # increment x
> x += 1
But it shouldn't say 'increment x', it should say 'add one to the line
count' or some such. Although changing the variable name to
'lineCount' would do almost as well.
--
Chris Green
ยท
--
https://mail.python.org/mailman/listinfo/python-l
Chris Angelico schrieb am 20.11.2014 um 06:06:
> On Thu, Nov 20, 2014 at 3:58 PM, Steven D'Aprano wrote:
>> And the award for the most gratuitous comments before an import goes to
>> one of my (former) workmates, who wrote this piece of code:
>>
>> # Used for base64-decoding.
>> import base64
>> #
On Wednesday, November 19, 2014 8:59:01 PM UTC-8, Steven D'Aprano wrote:
> And the award for the most gratuitous comments before an import goes to
> one of my (former) workmates, who wrote this piece of code:
>
> # Used for base64-decoding.
> import base64
> # Used for ungzipping.
> import gzip
>
On 20/11/2014 04:58, Steven D'Aprano wrote:
And the award for the most gratuitous comments before an import goes to
one of my (former) workmates, who wrote this piece of code:
# Used for base64-decoding.
import base64
# Used for ungzipping.
import gzip
I wonder if anybody has ever written thi
On Thu, Nov 20, 2014 at 3:58 PM, Steven D'Aprano wrote:
> And the award for the most gratuitous comments before an import goes to
> one of my (former) workmates, who wrote this piece of code:
>
> # Used for base64-decoding.
> import base64
> # Used for ungzipping.
> import gzip
Well hey. Good to
21 matches
Mail list logo