Skip to content

Instantly share code, notes, and snippets.

@AeroNotix
Created March 22, 2012 10:34
Show Gist options
  • Select an option

  • Save AeroNotix/2157619 to your computer and use it in GitHub Desktop.

Select an option

Save AeroNotix/2157619 to your computer and use it in GitHub Desktop.
def filter_by(filters):
def wrapper(function):
def inner_wrap(wrapped_args):
if wrapped_args not in filters:
return
return function(wrapped_args)
return inner_wrap
return wrapper
@filter_by(manager_list)
def recurse_search2(item):
for line in block:
if item[-1] != '':
if item[-2] == line[0]:
item.extend(line[2:])
else:
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment