[BangPypers] date range
Srinivas Reddy Thatiparthy
srinivas_thatiparthy at akebonosoft.com
Thu Feb 25 05:13:39 CET 2010
I mean it to the function foo().
Thanks&Regards,
Srinivas Reddy Thatiparthy,
Mobile:9393099772,
-----Original Message-----
From: bangpypers-bounces+srinivas_thatiparthy=akebonosoft.com at python.org on behalf of Vinay Shastry
Sent: Thu 2/25/2010 9:28 AM
To: Bangalore Python Users Group - India
Subject: Re: [BangPypers] date range
On 25 February 2010 09:21, Shashwat Anand <anand.shashwat at gmail.com> wrote:
>>
>> It can be called just once too...
>>
>> >>> def foo():
>> ... print "called"
>> ... return 0
>> ...
>> >>> 1 < foo() and foo() < 3
>> called
>> False
>>
>
> This is because AND operator short-circuits. So when 1 < foo() is false, it
> terminates then and there. Srinivas is correct here.
>
Yes, I'm just countering:
"It's called TWICE , no matter with or without side effects."
--
Vinay S Shastry
http://thenub.one09.net
_______________________________________________
BangPypers mailing list
BangPypers at python.org
http://mail.python.org/mailman/listinfo/bangpypers
More information about the BangPypers
mailing list