Skip to content

Instantly share code, notes, and snippets.

@xfire
xfire / gist:111923
Created May 14, 2009 21:07
python decorator example
#!/usr/bin/env python
#
# vim:syntax=python:sw=4:ts=4:expandtab
import functools
def wrap(orig_func):
# now some funky python magic
@functools.wraps(orig_func)
def outer(new_func):