Guest User

Untitled

a guest
Oct 21st, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. # decorator
  2. def action(pattern='^$', method='get'):
  3.  
  4. def _(handler):
  5. URL_MAP.append((pattern, method, handler))
  6. handler.__name__ = '%s_with_%s' % (handler.__name__, method)
  7. return handler
  8.  
  9. return _
Add Comment
Please, Sign In to add comment