import cherrypy


class Band(object):
    def __init__(self):
        self.albums = Album()

    def _cp_dispatch(self, vpath):
        if len(vpath) == 1:
            cherrypy.request.params['name'] = vpath.pop()
            return self

        if len(vpath) == 3:
            cherrypy.request.params['artist'] = vpath.pop(0)  # /band name/
            vpath.pop(0)  # /albums/
            cherrypy.request.params['title'] = vpath.pop(0)  # /album title/
            return self.albums

        return vpath

    @cherrypy.expose
    def index(self, name):
        return 'About %s...' % name


class Album(object):
    @cherrypy.expose
    def index(self, artist, title):
        return 'About %s by %s...' % (title, artist)

if __name__ == '__main__':
    cherrypy.quickstart(Band())
d477307d05d4237f57a29ed3516b6dec308caa69
<mask token>


class Band(object):

    def __init__(self):
        self.albums = Album()
    <mask token>
    <mask token>


class Album(object):

    @cherrypy.expose
    def index(self, artist, title):
        return 'About %s by %s...' % (title, artist)


<mask token>

<mask token>


class Band(object):

    def __init__(self):
        self.albums = Album()

    def _cp_dispatch(self, vpath):
        if len(vpath) == 1:
            cherrypy.request.params['name'] = vpath.pop()
            return self
        if len(vpath) == 3:
            cherrypy.request.params['artist'] = vpath.pop(0)
            vpath.pop(0)
            cherrypy.request.params['title'] = vpath.pop(0)
            return self.albums
        return vpath

    @cherrypy.expose
    def index(self, name):
        return 'About %s...' % name


class Album(object):

    @cherrypy.expose
    def index(self, artist, title):
        return 'About %s by %s...' % (title, artist)


<mask token>

<mask token>


class Band(object):

    def __init__(self):
        self.albums = Album()

    def _cp_dispatch(self, vpath):
        if len(vpath) == 1:
            cherrypy.request.params['name'] = vpath.pop()
            return self
        if len(vpath) == 3:
            cherrypy.request.params['artist'] = vpath.pop(0)
            vpath.pop(0)
            cherrypy.request.params['title'] = vpath.pop(0)
            return self.albums
        return vpath

    @cherrypy.expose
    def index(self, name):
        return 'About %s...' % name


class Album(object):

    @cherrypy.expose
    def index(self, artist, title):
        return 'About %s by %s...' % (title, artist)


if __name__ == '__main__':
    cherrypy.quickstart(Band())

import cherrypy


class Band(object):

    def __init__(self):
        self.albums = Album()

    def _cp_dispatch(self, vpath):
        if len(vpath) == 1:
            cherrypy.request.params['name'] = vpath.pop()
            return self
        if len(vpath) == 3:
            cherrypy.request.params['artist'] = vpath.pop(0)
            vpath.pop(0)
            cherrypy.request.params['title'] = vpath.pop(0)
            return self.albums
        return vpath

    @cherrypy.expose
    def index(self, name):
        return 'About %s...' % name


class Album(object):

    @cherrypy.expose
    def index(self, artist, title):
        return 'About %s by %s...' % (title, artist)


if __name__ == '__main__':
    cherrypy.quickstart(Band())

import cherrypy


class Band(object):
    def __init__(self):
        self.albums = Album()

    def _cp_dispatch(self, vpath):
        if len(vpath) == 1:
            cherrypy.request.params['name'] = vpath.pop()
            return self

        if len(vpath) == 3:
            cherrypy.request.params['artist'] = vpath.pop(0)  # /band name/
            vpath.pop(0)  # /albums/
            cherrypy.request.params['title'] = vpath.pop(0)  # /album title/
            return self.albums

        return vpath

    @cherrypy.expose
    def index(self, name):
        return 'About %s...' % name


class Album(object):
    @cherrypy.expose
    def index(self, artist, title):
        return 'About %s by %s...' % (title, artist)

if __name__ == '__main__':
    cherrypy.quickstart(Band())