MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / merge

Method merge

21-async/mojifinder/bottle.py:704–712  ·  view source on GitHub ↗

Merge the routes of another :class:`Bottle` application or a list of :class:`Route` objects into this application. The routes keep their 'owner', meaning that the :data:`Route.app` attribute is not changed.

(self, routes)

Source from the content-addressed store, hash-verified

702 self.route('/' + '/'.join(segments), **options)
703
704 def merge(self, routes):
705 ''' Merge the routes of another :class:`Bottle` application or a list of
706 :class:`Route` objects into this application. The routes keep their
707 'owner', meaning that the :data:`Route.app` attribute is not
708 changed. '''
709 if isinstance(routes, Bottle):
710 routes = routes.routes
711 for route in routes:
712 self.add_route(route)
713
714 def install(self, plugin):
715 ''' Add a plugin to the list of plugins and prepare it for being

Callers

nothing calls this directly

Calls 1

add_routeMethod · 0.95

Tested by

no test coverage detected