Re: Chained Comparisons

2006-03-20 Thread Grant Edwards
On 2006-03-20, Sathyaish <[EMAIL PROTECTED]> wrote: >>And firing up a news client, posting a message, and /waiting/ >> for a response isn't? In most cases, you could have read half >> the language reference manual in the time it takes to get an >> online response. > > Posting a question in the new

Re: Chained Comparisons

2006-03-20 Thread Sathyaish
Thanks for the encouragement, Steve. I am learning Python out of earnest; I am intrigued by several languages such as Ruby, Python and Lisp. At work, I program VB6 (used to), VB.NET, C# and C over the Win32 platform. > that Sathyaish's time is more important than your time, of course. LOL. Cer

Re: Chained Comparisons

2006-03-20 Thread Fredrik Lundh
Duncan Booth wrote: >> 2) A search in the same document you are reading takes you "off" and >> "adrift", and as such, is equivalant to a task-switch, because you're >> already reading some material from the same help file and are stuck at >> some point. > > I've tried reading this several times an

Re: Chained Comparisons

2006-03-20 Thread Steve Holden
Sathyaish wrote: > Thanks, Peter. I do use the interpreter alongside while reading the > documentation and also try out the examples. It was just a matter of > chance that for this particular situation, I did not. > > Thank you for the answers, everyone. I hope I am still welcome here for > more q

Re: Chained Comparisons

2006-03-20 Thread Sathyaish
Thanks, Peter. I do use the interpreter alongside while reading the documentation and also try out the examples. It was just a matter of chance that for this particular situation, I did not. Thank you for the answers, everyone. I hope I am still welcome here for more questions. -- http://mail.py

Re: Chained Comparisons

2006-03-20 Thread Peter Otten
Sathyaish wrote: > OK, I get it. Just stop whining endlessly about it, guys. Relax. Take what's in it for you and forget about the rest. > I *do* use the interpreter. I posted a question here. And I showed you an easy way to answer it yourself. Using the interpreter doesn't seem to be as ing

Re: Chained Comparisons

2006-03-20 Thread Sathyaish
OK, I get it. Just stop whining endlessly about it, guys. I *do* use the interpreter. I posted a question here. Sorry, I committed a sin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Chained Comparisons

2006-03-20 Thread Peter Otten
Sathyaish wrote: > I) What does the following expression evaluate to? > > a < b == c > > 1) (a < b) and (b == c) > 2) (a < b) or (b == c) then later > 1) It is easier to learn through an interactive medium like a forum; There is a convenient alternative to asking basic questions on c.l.py or

Re: Chained Comparisons

2006-03-20 Thread Sathyaish
>And firing up a news client, posting a message, and /waiting/ for a response isn't? In most cases, you could have read half the language reference manual in the time it takes to get an online response. No, it isn't because you continue reading the same stuff and you have the stuff open in another

Re: Chained Comparisons

2006-03-20 Thread Duncan Booth
Sathyaish wrote: > I did "guess" but I wasn't quite sure and so I asked. OK, I did not > perform a search on the docs, but that was because: > > 1) It is easier to learn through an interactive medium like a forum; and what exactly do you think the other people in the forum do? They go off and r

Re: Chained Comparisons

2006-03-20 Thread Sathyaish
John, I did "guess" but I wasn't quite sure and so I asked. OK, I did not perform a search on the docs, but that was because: 1) It is easier to learn through an interactive medium like a forum; and 2) A search in the same document you are reading takes you "off" and "adrift", and as such, is eq

Re: Chained Comparisons

2006-03-20 Thread John Machin
On 20/03/2006 5:24 PM, Sathyaish wrote: > I) What does the following expression evaluate to? > > a < b == c > > 1) (a < b) and (b == c) > 2) (a < b) or (b == c) > Given the common idiom in mathematics (a <= b <= c) and what it means, please contemplate which of "and" and "or" might be the more

Re: Chained Comparisons

2006-03-19 Thread Fredrik Lundh
"Sathyaish" wrote: > I) What does the following expression evaluate to? > > a < b == c > > 1) (a < b) and (b == c) > 2) (a < b) or (b == c) http://docs.python.org/ref/comparisons.html Formally, if a, b, c, ..., y, z are expressions and opa, opb, ..., opy are comparison operators, the

Chained Comparisons

2006-03-19 Thread Sathyaish
I) What does the following expression evaluate to? a < b == c 1) (a < b) and (b == c) 2) (a < b) or (b == c) II) How many operands can be chained for comparison in a single expression? For e.g, is the under-stated expression a valid comparison chain? a < b == c > d -- http://mail.python.org/