Can someone explain this Python code? (possible use of decorator)
<p>I am trying to write a simple (lightweight) RESTful server in Python. I have come across the following code from <a href="http://code.google.com/p/mimerender/" rel="nofollow">Google</a>:</p>

<pre><code>import web
import json
from mimerender import mimerender

render_xml = lambda message: '&lt;message&gt;%s&lt;/message&gt;'%message
render_json = lambda **args: json.dumps(args)
render_html = lambda message: '&lt;html&gt;&lt;body&gt;%s&lt;/body&gt;&lt;/html&gt;'%message
render_txt = lambda message: message

urls = (
    '/(.*)', 'greet'
)
app = web.application(urls, globals())

class greet:
    @mimerender(
        default = 'html',
        html = render_html,
        xml  = render_xml,
        json = render_json,
        txt  = render_txt
    )
    def GET(self, name):
        if not name: 
            name = 'world'
        return {'message': 'Hello, ' + name + '!'}

if __name__ == "__main__":
    app.run()
</code></pre>

<p>I am unfamiliar with the syntax used on the line <code>@mimerender</code>. This appears to be a a weird combination of a constructor and a function decorator - however, all uses of decorators I have encountered to date are typically written like this:</p>

<pre><code>def foo():
    pass

def foobar():
    pass

@foo
@pass
def some_other_func():
    pass
</code></pre>

<p>What does the <code>@mimerender</code> section of the code mean/do?</p>
