Skip to content

Instantly share code, notes, and snippets.

@pgollakota
Created February 3, 2012 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgollakota/1727264 to your computer and use it in GitHub Desktop.
Save pgollakota/1727264 to your computer and use it in GitHub Desktop.
from functools import wraps
# final version which retains the decorated function name etc.
def accept_n_gt_zero_only(f:(
@wraps(f)
def f_n_gt_zero(n, *args, **kwargs:(
# ... same as above ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment