MCPcopy
hub / github.com/fluentpython/example-code-2e / _

Function _

09-closure-deco/htmlizer.py:47–49  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

45
46@htmlize.register # <2>
47def _(text: str) -> str: # <3>
48 content = html.escape(text).replace('\n', '<br/>\n')
49 return f'<p>{content}</p>'
50
51@htmlize.register # <4>
52def _(seq: abc.Sequence) -> str:

Callers

nothing calls this directly

Calls 2

htmlizeFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected