> > 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 _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers