Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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>
47
def
_(text: str) -> str:
# <3>
48
content = html.escape(text).replace(
'\n'
,
'<br/>\n'
)
49
return
f
'<p>{content}</p>'
50
51
@htmlize.register
# <4>
52
def
_(seq: abc.Sequence) -> str:
Callers
nothing calls this directly
Calls
2
htmlize
Function · 0.85
replace
Method · 0.45
Tested by
no test coverage detected