Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robo-corg/531854 to your computer and use it in GitHub Desktop.
Save robo-corg/531854 to your computer and use it in GitHub Desktop.
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