On 1/26/11 12:26 PM, sl33k_ wrote: > How does "return True" and "return False" affect the execution of the > calling function?
It doesn't -- the value 'True' or 'False' is simply returned, and assigned to a name if the calling function does so explicitly. But there's no built in affects. If you want it to alter the execution, you have to do so yourself, i.e.: def myfun(): return True def myfun2(): return False if myfun(): print "Something is true!" myfun2() print "I'm called. Cuz, the return value of myfun2 was simply discarded." -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/
signature.asc
Description: OpenPGP digital signature
-- http://mail.python.org/mailman/listinfo/python-list