byron wrote:
Being that each function is an object, a name assignment to
(tmp1,tmp2) doesn't actually evaluate or run the function itself until
the name is called..
the above would be true if the code had been
tmp1, tmp2 = f1, f2
but it isn't. look again.
--
http://mail.python.org/mai
On Sep 12, 3:51 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Sep 13, 5:36 am, byron <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am reading o'reilly's learning python (great book), but i came
> > across an example (pg 291, pdf) that I am not quite understanding the
> > reasoning for the author's expla
On Sep 13, 5:36 am, byron <[EMAIL PROTECTED]> wrote:
> I am reading o'reilly's learning python (great book), but i came
> across an example (pg 291, pdf) that I am not quite understanding the
> reasoning for the author's explanation:
>
> if f1() or f2():
>
> The author states that do to the nature
Note the parentheses after f1 and f2 in the second example. That's
what calls the functions and causes them to be evaluated and run.
- Chris
Sent from my iPod
On Sep 12, 2008, at 12:36 PM, byron <[EMAIL PROTECTED]> wrote:
I am reading o'reilly's learning python (great book), but i came
acro
byron a écrit :
I am reading o'reilly's learning python (great book), but i came
across an example (pg 291, pdf) that I am not quite understanding the
reasoning for the author's explanation:
if f1() or f2():
The author states that do to the nature of that expression, if f1()
returns True, f2()
I am reading o'reilly's learning python (great book), but i came
across an example (pg 291, pdf) that I am not quite understanding the
reasoning for the author's explanation:
if f1() or f2():
The author states that do to the nature of that expression, if f1()
returns True, f2() will not be evalua