MCPcopy
hub / github.com/aosabook/500lines / flush_output

Method flush_output

template-engine/code/templite.py:122–128  ·  view source on GitHub ↗

Force `buffered` to the code builder.

()

Source from the content-addressed store, hash-verified

120
121 buffered = []
122 def flush_output():
123 """Force `buffered` to the code builder."""
124 if len(buffered) == 1:
125 code.add_line("append_result(%s)" % buffered[0])
126 elif len(buffered) > 1:
127 code.add_line("extend_result([%s])" % ", ".join(buffered))
128 del buffered[:]
129
130 ops_stack = []
131

Callers

nothing calls this directly

Calls 2

add_lineMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected