[Tutor] Re: Are you allowed to shoot camels? [kinda OT]

Alan Gauld alan.gauld at freenet.co.uk
Sat Feb 5 01:18:25 CET 2005


> > I think its clearer! It says that the first two things happen
> > or else the last thing. Plain English.
>
> That's apparently subjective then.

So it seems. You always assume that whats clear to you will be
clear to all! This discussion proves it ain't necessarily so...

> eye. (x**2 for x in range(10)) didn't mean anything to me either,
the
> first time I saw it.

Nor me and I knew comprehensions from Haskell. Its taken me about 203
years to get comfortable with LCS inPython.
I really wish they'd stick a marker (| or : or even a $!) between
the first item and the loop:

[x**2 | for x in range(10)]

I'd have found it much easier to grok. And I can't think iof any
syntax rules of expressions it wouuld break. Do we use | as a
bitwise operatorin Python? I don't think so...

> absolutely be useful when judisciously used. Many such lists seem to
> assume that developers can't judge such things for themselves. I
think

Having been involved in creating a couple such coding guidelines
lists I can say from experience that they mostly reflect the problems
the maintenance teams struggle with most. And having led a team
of maintenance C programmers for 2 years I fully sympathise
with the view that programmers can't judge very well. (And that
includes myself, I am well aware that what seems perfectly clear
to me when I write it may not be to some poor sap who has
to fix/enhance it) And remember too that maintenance accounts
for 80% of the cost on most software projects...

Alan G.



More information about the Tutor mailing list