#!/usr/bin/python# -*- coding: utf-8 -*-def print_before_exec(func): def _(*args, **kwargs): print "decorated", args[0] return func(*args, **kwargs) return _@print_before_execdef double(x): print 2*xif __name__ == "__main__": double(2)