def create_method_not_allowed(allowed_methods):
 def method_not_allowed(req, resp, **kwargs):
  'Raise 405 HTTPMethodNotAllowed error'
  raise HTTPMethodNotAllowed(allowed_methods)
 return method_not_allowed

def create_method_not_allowed ( allowed_methods ) : def method_not_allowed ( req , resp , ** kwargs ) : raise HTTPMethodNotAllowed ( allowed_methods ) return method_not_allowed
creates a responder for "405 method not allowed" args: allowed_methods: a list of http methods that should be returned in the allow header .