def action(*methods, **kwargs):
<EOL>methods = list(methods)<EOL>attrs = dict(_wsgi_action=True)<EOL>if methods and methods[<NUM_LIT:0>][<NUM_LIT:0>] == '<STR_LIT:/>':<EOL><INDENT>attrs['<STR_LIT>'] = utils.norm_path(methods.pop(<NUM_LIT:0>))<EOL>if methods:<EOL><INDENT>attrs['<STR_LIT>'] = [meth.upper() for meth in methods]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>attrs['<STR_LIT>'] = None<EOL>attrs['<STR_LIT>'] = None<EOL><DEDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>condition = kwargs.pop('<STR_LIT>')<EOL>@functools.wraps(condition)<EOL>def wrapper(req, match_dict):<EOL><INDENT>if isinstance(req, dict):<EOL><INDENT>req = webob.Request(req)<EOL><DEDENT>return condition(req, match_dict)<EOL><DEDENT>attrs['<STR_LIT>'] = wrapper<EOL><DEDENT>if '<STR_LIT:code>' in kwargs:<EOL><INDENT>attrs['<STR_LIT>'] = kwargs.pop('<STR_LIT:code>')<EOL><DEDENT>kwargs.pop('<STR_LIT:action>', None)<EOL>kwargs.pop('<STR_LIT>', None)<EOL>if kwargs:<EOL><INDENT>attrs['<STR_LIT>'] = kwargs<EOL><DEDENT>def decorator(func):<EOL><INDENT>func.__dict__.update(attrs)<EOL>return func<EOL><DEDENT>return decorator<EOL>
Decorator which marks a method as an action.  The first positional
argument identifies a Routes-compatible path for the action
method, which must begin with a '/'.  If specified, the remaining
positional arguments identify permitted HTTP methods.  The
following keyword arguments are also recognized:

* conditions
    Identifies a single function which will be passed the request
    (an instance of `webob.Request` and the match dictionary.  It
    should return True if the route matches, and False otherwise.

* code
    Specifies the default HTTP return code to use for the
    response.  If not specified, defaults to 200.  Note that the
    action method may always return a ResponseObject instance with
    an alternate code, if desired.

All other keyword arguments will be statically passed to the
action method when called.