cascading python executions only if return code is 0

Frank Cui ycui at outlook.com
Sun Dec 22 19:37:04 CET 2013


hey guys,
I have a requirement where I need to sequentially execute a bunch of executions, each execution has a return code. the followed executions should only be executed if the return code is 0. is there a cleaner or more pythonic way to do this other than the following ? 
if a() == 0:    if b() == 0:        c()
Thanks for your input.
frank 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131222/357c3c9e/attachment.html>


More information about the Python-list mailing list