Skip to content

Instantly share code, notes, and snippets.

@pcote
Created July 26, 2015 15:06
Show Gist options
  • Save pcote/a615c7497699569af470 to your computer and use it in GitHub Desktop.
Save pcote/a615c7497699569af470 to your computer and use it in GitHub Desktop.
class count_limiter(object):
def __init__(self, count_limit):
pass
def __call__(self, func):
def wrapper(*args, **kwargs):
res = func(*args, **kwargs)
return res
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment