I mean it to the function foo().

Thanks&Regards,
Srinivas Reddy Thatiparthy, 
Mobile:9393099772, 



-----Original Message-----
From: bangpypers-bounces+srinivas_thatiparthy=akebonosoft....@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.shash...@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@python.org
http://mail.python.org/mailman/listinfo/bangpypers

_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to