Eval of expr with 'or' and 'and' within
Nick the Gr33k
support at superhost.gr
Sat Jun 15 03:57:05 EDT 2013
On 14/6/2013 7:42 μμ, Nobody wrote:
> Python implements these operators by returning the actual value which
> determined the result of the expression rather than simply True or False.
which in turn the actual value being returned is a truthy or a falsey.
That cleared the mystery in my head entirely.
I wouldn't have asked so many follow-up questions in the thread if i
received that kind of a response.
Thank you very much for this response.
> If the result is known after evaluating the first argument, the first
> argument is returned. If it has to evaluate the second argument, the
> second argument is returned (by that point it has already forgotten
> the value of the first argument).
So, the less it has to calculate to determine the correct result of an
expression the better.
Thanks again very much.
--
What is now proved was at first only imagined!
More information about the Python-list
mailing list