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

Method loader

21-async/mojifinder/bottle.py:3344–3348  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

3342 return self.tpl.render(**_defaults)
3343
3344 def loader(self, name):
3345 fname = self.search(name, self.lookup)
3346 if not fname: return
3347 with open(fname, "rb") as f:
3348 return f.read().decode(self.encoding)
3349
3350
3351class SimpleTemplate(BaseTemplate):

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.80
readMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected