Source

CherryPy / cherrypy / test / cp_decorator_tests.py

Full commit

import cherrypy
class Exposing:
    @cherrypy.expose("1")
    def base(self):
        return "expose works!"
    cherrypy.expose(base, "2")

class ExposingNewStyle(object):
    @cherrypy.expose("1")
    def base(self):
        return "expose works!"
    cherrypy.expose(base, "2")