[BangPypers] date range

Shashwat Anand anand.shashwat at gmail.com
Thu Feb 25 04:51:11 CET 2010


>
> 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.

~l0nwlf


More information about the BangPypers mailing list