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

Class AppStack

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

A stack-like list. Calling it returns the head of the stack.

Source from the content-addressed store, hash-verified

2216
2217
2218class AppStack(list):
2219 """ A stack-like list. Calling it returns the head of the stack. """
2220
2221 def __call__(self):
2222 """ Return the current default application. """
2223 return self[-1]
2224
2225 def push(self, value=None):
2226 """ Add a new :class:`Bottle` instance to the stack """
2227 if not isinstance(value, Bottle):
2228 value = Bottle()
2229 self.append(value)
2230 return value
2231
2232
2233class WSGIFileWrapper(object):

Callers 1

bottle.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected