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

Method prepare

21-async/mojifinder/bottle.py:3353–3360  ·  view source on GitHub ↗
(self, escape_func=html_escape, noescape=False, syntax=None, **ka)

Source from the content-addressed store, hash-verified

3351class SimpleTemplate(BaseTemplate):
3352
3353 def prepare(self, escape_func=html_escape, noescape=False, syntax=None, **ka):
3354 self.cache = {}
3355 enc = self.encoding
3356 self._str = lambda x: touni(x, enc)
3357 self._escape = lambda x: escape_func(touni(x, enc))
3358 self.syntax = syntax
3359 if noescape:
3360 self._str, self._escape = self._escape, self._str
3361
3362 @cached_property
3363 def co(self):

Callers

nothing calls this directly

Calls 1

touniFunction · 0.85

Tested by

no test coverage detected