Newcomer struggling with tutorial

Nils O. Selåsdal noselasd at frisurf.no
Sun Oct 5 15:19:04 EDT 2003


In article <blpf2k$fef$1 at titan.btinternet.com>, CPK Smithies wrote:
> "Tim Peters" <tim.one at comcast.net> wrote in
> news:mailman.1065325869.29360.python-list at python.org: 
> 
>> Perhaps that's confusing you.).
> 
> Yes. I screwed up with my example and I'm sorry to waste people's time. I 
> was getting confused.
> 
> What I found so disturbing is that
> 
> a < b == c
> 
> is not equivalent either to
> 
> (a < b) == c
> 
> nor to
> 
> a < (b == c)
> 
> since (given that for example (a, b, c) == (-1, 77, 1)) the first is false 
> while the latter are both true. 
> 
> Perhaps some people enjoy mastering quirks like these. I just see it as a 
> source of confusion and errors. What's so terrible about having to type "(a 
> < b) && (b == c)" if that's what is intended? Is it really worth 
> sacrificing a logical grammar for the sake of a few keystrokes? So it's not 
> a bug in implementation that I'm talking about. It's a bug in the design.

So don't bother with that quirk then. Forget it exists.
Just use (a < b) && (b == c)

-- 
Nils Olav Selåsdal <NOS at Utel.no>
System Developer, UtelSystems a/s
w w w . u t e l s y s t e m s . c o m





More information about the Python-list mailing list