Answer architecture round 2: 0 🔴, 1 🟡; join prose lists with one markdown_text.listed, and floor the replays at lowest_worker_rung

This commit is contained in:
2026-10-16 12:18:03 +02:00
parent 12909f233d
commit f319a96e7e
11 changed files with 40 additions and 34 deletions
+6
View File
@@ -1,4 +1,5 @@
import re
import typing
FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})", re.M)
@@ -30,3 +31,8 @@ def sections(text: str) -> dict[str, list[str]]:
# Blockquoted, so a passage holding blank lines still ends visibly where the text after it starts.
def quoted(passage: str) -> str:
return "\n".join(f"> {line}" for line in passage.splitlines())
def listed(names: typing.Sequence[str], conjunction: str) -> str:
"""The names as `a, b and c`, with conjunction, such as and or or, before the last."""
return names[0] if len(names) == 1 else f"{', '.join(names[:-1])} {conjunction} {names[-1]}"