Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 14th, 2010 | Syntax: Python | Size: 0.31 KB | Hits: 85 | Expires: Never
Copy text to clipboard
  1. def wrap_in_master(master_template):
  2.     def _for_real(f):
  3.         def _(*args):
  4.             master = get_template(master_template)
  5.             output = f(*args)
  6.             if "master" not in output:
  7.                 output["master"] = master
  8.             return output
  9.         return _
  10.     return _for_real