def dec(function): def _wrapper(*args, **kwargs): print len(args) + len(kwargs) return function(*args, **kwargs) return _wrapper