Go through a number of functions in Python

Posted by Asaf on Stack Overflow See other posts from Stack Overflow or by Asaf
Published on 2010-05-16T08:28:57Z Indexed on 2010/05/16 8:30 UTC
Read the original article Hit count: 235

Filed under:

I have an unknown number of functions in my python script (well, it is known, but not constant) that start with site_... I was wondering if there's a way to go through all of these functions in some main function that calls for them. something like: foreach function_that_has_site_ as coolfunc if coolfunc(blabla,yada) == true: return coolfunc(blabla,yada)

so it would go through them all until it gets something that's true.

thanks!

© Stack Overflow or respective owner

Related posts about python