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

2005-02-04 Thread Bud Rogers
On Friday 04 February 2005 03:42, Alan Gauld wrote:
> On Thursday 03 February 2005 17:41, Alan Gauld wrote:
> >> In fact the best style of all is neither of the two I showed,
> >> its actually this - which early everyone hates when they see it!
> >>
> >> inf f(x)
> >>{
> >>bah()
> >>}
> >
> >Ugh.  Alan, I won't even try to dispute the study.  But if I have to
> >write code like that, I'll just take up gardening instead.   :}
>
> Look at it conceptually:
>
> 
> X
> X
> X
>
> Thats Python! Since you are on this list I suspect you do write
> "code like that" Its just Guido removed the now extraneous {}...

Oh yes, you are absolutely right.  If you remove the braces, all three 
(four?) styles of indentation are conceptually identical AFAICS.  My 
objection is purely personal and aesthetic.  The style above is just 
plain ugly to me.  I'm not clear on which style is which, but I think 
the Allman style(?):

if (foo)
{
  bar;
} 

is also ugly but slightly less so.  The K&R style(?):

if (foo) {
 bar;
}

is what I use in perl.  I wouldn't go so far as to say it's pretty, it's 
just the least ugly of the styles I know about. 

And of course from a personal aesthetic perspective, I think python 
style is much prettier.   Well written python reads like pseudocode. 
It's actually pleasant to read. If a routine is well written, with good 
variable names, etc, you don't even have to know much about python to 
understand what it does.   That's one of the things that attracted me 
to python in the first place.

-- 
Bud Rogers <[EMAIL PROTECTED]>  KD5SZ

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


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

2005-02-03 Thread Bud Rogers
On Thursday 03 February 2005 17:41, Alan Gauld wrote:
> In fact the best style of all is neither of the two I showed,
> its actually this - which early everyone hates when they see it!
>
> inf f(x)
>     {
>     bah()
>     }

Ugh.  Alan, I won't even try to dispute the study.  But if I have to 
write code like that, I'll just take up gardening instead.   :}

-- 
Bud Rogers <[EMAIL PROTECTED]>  KD5SZ

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Re: O.T.

2004-12-27 Thread Bud Rogers
On Monday 27 December 2004 18:49, Roel Schroeven wrote:
> > I would be grateful for a less restrictive link.
>
> http://pythonology.org/success&story=esr

Thanks for the link.

-- 
Bud Rogers <[EMAIL PROTECTED]>  KD5SZ

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] O.T.

2004-12-27 Thread Bud Rogers
I'm 53, married, father of two.  I work for a power company.  My title 
is systems analyst, but the work I do is mostly system administration.  
I've gotten a lot of mileage out of perl, mostly small ad hoc scripts 
for one thing or another.

Just beginning serious study of python, partly because of ESR's article 
"Why Python?", which I thought was on his website but apparently is 
only available at the Linux Journal website:

 http://www.linuxjournal.com/article.php?sid=3882

I would be grateful for a less restrictive link.

-- 
Bud Rogers <[EMAIL PROTECTED]>
Nine words the Eclectic Rede attest:
Steal what works.  Fix what's broke.  Fake the rest.

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor