Whoops! > dispatches = {'default.htm': default, > 'view.htm': view, > 'edit.htm': edit, > } > > try: > nextHandler = self.dispatches[script] > except KeyError: > nextHandler = self.dispatches['default.htm'] > return nextHandler(req) You should just write: nextHandler = dispatches[script] ...instead of self.dispatches. FuManChu