Created
May 27, 2009 01:55
-
-
Save larsks/118421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cp_config(cfg): | |
'''Add cherrypy configuration dictionary to the _cp_config | |
attribute of a method.''' | |
def decorate(f): | |
setattr(f, '_cp_config', cfg) | |
return f | |
return decorate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment