On 14/6/2013 7:47 μμ, Benjamin Kaplan wrote:
 In an "and" clause,
python returns the first false value or the last value, because that
will evaluate to the correct Boolean value. In an "or" clause, python
returns the first true value or the last value. When Python finally got
a Boolean type, no one wanted to break backwards compatibility for this.


This is exactly what i dont understand and thats why i keep asking and people call me an idiot. I just dont understand why it behaves like that.

Why return first or last value?

because that will evaluate to the correct Boolean value ????

How do you mean? Please elaborate.

--
What is now proved was at first only imagined!
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to