Created
August 17, 2010 20:26
-
-
Save robo-corg/531854 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_ifcs(links,rec=2): | |
return ifilter(lambda x: x!=None,chain(*[chain([link.ifc1,link.ifc2],get_ifcs(link.ordered_provider_links,rec-1)) for link in links]) if rec > 0 else []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment